1
0
Fork 0

use auto to prevent length truncation/rollover

This commit is contained in:
Kevin Matz 2023-05-18 14:45:10 -04:00
parent 41c89e06e0
commit 8dc6c36e36
1 changed files with 1 additions and 1 deletions

View File

@ -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)