Browse Source

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

Mukund Sivaraman 11 years ago
parent
commit
45809d98ad
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/bin/dhcp6/dhcp6_srv.cc

+ 3 - 0
src/bin/dhcp6/dhcp6_srv.cc

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