From: Francis Dupont Date: Thu, 28 Sep 2017 22:38:25 +0000 (+0200) Subject: [5226] Addressed review comments X-Git-Tag: trac5381_base~5^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=95e05cd2b149deda6dc6b809a251e6c8f7cd2fec;p=thirdparty%2Fkea.git [5226] Addressed review comments --- diff --git a/src/lib/dhcp/option_custom.h b/src/lib/dhcp/option_custom.h index 6af94c37f1..1dcdc00264 100644 --- a/src/lib/dhcp/option_custom.h +++ b/src/lib/dhcp/option_custom.h @@ -427,6 +427,7 @@ private: /// @param end iterator to end of input data. /// /// @return size of data to copy to the buffer. + /// @throw isc::OutOfRange if option buffer is truncated. size_t bufferLength(const OptionDataType data_type, bool in_array, OptionBuffer::const_iterator begin, OptionBuffer::const_iterator end) const; diff --git a/src/lib/dhcp/tests/option_custom_unittest.cc b/src/lib/dhcp/tests/option_custom_unittest.cc index ba7bc3f2ea..d92784fa67 100644 --- a/src/lib/dhcp/tests/option_custom_unittest.cc +++ b/src/lib/dhcp/tests/option_custom_unittest.cc @@ -1301,7 +1301,7 @@ TEST_F(OptionCustomTest, recordArrayData) { // Initialize field 0 to 8712. writeInt(8712, buf); // Initialize field 1 to 'true' - buf.push_back(static_cast(1)); + writeInt(1, buf); // Initialize field 2 to 'mydomain.example.com'. buf.insert(buf.end(), fqdn_data, fqdn_data + sizeof(fqdn_data)); // Initialize field 3 to IPv4 address.