use auto to prevent length truncation/rollover
This commit is contained in:
parent
41c89e06e0
commit
8dc6c36e36
|
@ -181,7 +181,7 @@ void Pdu::iStream(Stream stream)
|
|||
|
||||
// length includes the flags, length, and vector.
|
||||
// the remainder of the length of header and data
|
||||
unsigned int hd_length = length - (flags_.hasLength ? 3 : 2) - vector_size_;
|
||||
auto hd_length = length - (flags_.hasLength ? 3 : 2) - vector_size_;
|
||||
|
||||
// abort if the remaining PDU length isn't available
|
||||
if (!stream->good() || stream->available() < hd_length)
|
||||
|
|
Loading…
Reference in New Issue