BIND 10 trac2387, updated. 4778557e13c231f1bd2cde5d0950b68de920d8cd [2387] Add unmatched parenthesis testcases that cause lexer failures (when looking for string)
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Apr 2 11:51:53 UTC 2013
The branch, trac2387 has been updated
via 4778557e13c231f1bd2cde5d0950b68de920d8cd (commit)
from 7b2ee20fb35a475916a817c30668d31d15fc8907 (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 4778557e13c231f1bd2cde5d0950b68de920d8cd
Author: Mukund Sivaraman <muks at isc.org>
Date: Tue Apr 2 11:36:33 2013 +0530
[2387] Add unmatched parenthesis testcases that cause lexer failures (when looking for string)
-----------------------------------------------------------------------
Summary of changes:
src/lib/dns/tests/rdata_dnskey_unittest.cc | 3 +++
src/lib/dns/tests/rdata_nsec3_unittest.cc | 9 +++++++--
2 files changed, 10 insertions(+), 2 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/dns/tests/rdata_dnskey_unittest.cc b/src/lib/dns/tests/rdata_dnskey_unittest.cc
index 95075de..e99fc58 100644
--- a/src/lib/dns/tests/rdata_dnskey_unittest.cc
+++ b/src/lib/dns/tests/rdata_dnskey_unittest.cc
@@ -130,6 +130,9 @@ TEST_F(Rdata_DNSKEY_Test, fromText) {
// parsing from it.
checkFromText_BadString("257 3 5 YmluZDEwLmlzYy5vcmc= ; comment\n"
"257 3 4 YmluZDEwLmlzYy5vcmc=");
+
+ // Unmatched parenthesis should cause a lexer error
+ checkFromText_LexerError("257 3 5 )YmluZDEwLmlzYy5vcmc=");
}
TEST_F(Rdata_DNSKEY_Test, assign) {
diff --git a/src/lib/dns/tests/rdata_nsec3_unittest.cc b/src/lib/dns/tests/rdata_nsec3_unittest.cc
index 8b6db0f..347e395 100644
--- a/src/lib/dns/tests/rdata_nsec3_unittest.cc
+++ b/src/lib/dns/tests/rdata_nsec3_unittest.cc
@@ -121,8 +121,9 @@ TEST_F(Rdata_NSEC3_Test, fromText) {
checkFromText_InvalidText("1 1 65536 D399EAAB "
"H9RSFB7FPF2L8HG35CMPC765TDK23RP6 A NS SOA");
- // Space is not allowed in salt (this actually causes the Base32
- // decoder to throw)
+ // Space is not allowed in salt or the next hash. This actually
+ // causes the Base32 decoder that parses the next hash that comes
+ // afterwards, to throw.
checkFromText_BadValue("1 1 1 D399 EAAB H9RSFB7FPF2L8"
"HG35CMPC765TDK23RP6 A NS SOA");
@@ -144,6 +145,10 @@ TEST_F(Rdata_NSEC3_Test, fromText) {
checkFromText_BadString(
"1 1 1 D399EAAB H9RSFB7FPF2L8HG35CMPC765TDK23RP6 A NS SOA ;comment\n"
"1 1 1 D399EAAB H9RSFB7FPF2L8HG35CMPC765TDK23RP6 A NS SOA");
+
+ // Unmatched parenthesis should cause a lexer error
+ checkFromText_LexerError("1 1 1 D399EAAB "
+ "H9RSFB7FPF2L8HG35CMPC765TDK23RP6 A ) NS SOA");
}
TEST_F(Rdata_NSEC3_Test, createFromWire) {
More information about the bind10-changes
mailing list