From 8dc6c36e363c7b398ede87f52d20ba3a45046466 Mon Sep 17 00:00:00 2001 From: Kevin Matz Date: Thu, 18 May 2023 14:45:10 -0400 Subject: [PATCH] use auto to prevent length truncation/rollover --- protocol/esta/acn/pdu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol/esta/acn/pdu.cpp b/protocol/esta/acn/pdu.cpp index 2c0514c..0d19c3c 100644 --- a/protocol/esta/acn/pdu.cpp +++ b/protocol/esta/acn/pdu.cpp @@ -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)