Commit 45809d98 authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[2749] Add comment that we know there's room available in the buffer

parent c7aeb4be
......@@ -2345,6 +2345,9 @@ Dhcpv6Srv::unpackOptions(const OptionBuffer& buf,
// The buffer being read comprises a set of options, each starting with
// a two-byte type code and a two-byte length field.
while (offset + 4 <= length) {
// At this point, from the while condition, we know that there
// are at least 4 bytes available following offset in the
// buffer.
uint16_t opt_type = isc::util::readUint16(&buf[offset], 2);
offset += 2;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment