remove incorrect length check. Vector may be inherited.

This commit is contained in:
Kevin Matz 2021-01-08 02:34:08 -05:00
parent a678676d3d
commit 04d103a427
1 changed files with 0 additions and 4 deletions

View File

@ -51,10 +51,6 @@ Pdu::Pdu(stream_ptr stream, size_t vector_size)
// length includes the flags, length, and vector
// calculate the remaining length of the PDU
int len = length_ - (flags_.hasLength ? 3 : 2);
if (len < (int)vector_size) {
stream->setstate(stream->rdstate() | std::ios_base::failbit);
return;
}
// abort if the remaining PDU length isn't available
if (!stream->good() || stream->available() < len) {