Commit 27dcc01e authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2389] added more notes on length validation for from-str in::A ctor

parent 38c66b96
......@@ -45,6 +45,10 @@ convertToIPv4Addr(const char* src, size_t src_len, uint32_t* dst) {
// This check specifically rejects invalid input that begins with valid
// address text followed by a nul character (and possibly followed by
// further garbage). It cannot be detected by inet_pton().
//
// Note that this is private subroutine of the in::A constructors, which
// pass std::string.size() or StringRegion::len as src_len, so it should
// be equal to strlen() unless there's an intermediate nul character.
if (src_len != strlen(src)) {
isc_throw(InvalidRdataText,
"Bad IN/A RDATA text: unexpected nul in string: '"
......
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