BIND 10 trac2389, updated. 27dcc01ebedf492bdf7e281efe76223c7987c757 [2389] added more notes on length validation for from-str in::A ctor
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Feb 26 21:19:25 UTC 2013
The branch, trac2389 has been updated
via 27dcc01ebedf492bdf7e281efe76223c7987c757 (commit)
from 38c66b96176dc01a73f6d080728ce7386db196a1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 27dcc01ebedf492bdf7e281efe76223c7987c757
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Tue Feb 26 13:19:02 2013 -0800
[2389] added more notes on length validation for from-str in::A ctor
-----------------------------------------------------------------------
Summary of changes:
src/lib/dns/rdata/in_1/a_1.cc | 4 ++++
1 file changed, 4 insertions(+)
-----------------------------------------------------------------------
diff --git a/src/lib/dns/rdata/in_1/a_1.cc b/src/lib/dns/rdata/in_1/a_1.cc
index c9ae65d..b187346 100644
--- a/src/lib/dns/rdata/in_1/a_1.cc
+++ b/src/lib/dns/rdata/in_1/a_1.cc
@@ -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: '"
More information about the bind10-changes
mailing list