]> granicus.if.org Git - pdns/commitdiff
Check that parser throws when all data is not consumed
authorAki Tuomi <cmouse@desteem.org>
Thu, 24 Apr 2014 14:24:41 +0000 (17:24 +0300)
committerAki Tuomi <cmouse@desteem.org>
Thu, 24 Apr 2014 14:24:41 +0000 (17:24 +0300)
pdns/test-dnsrecords_cc.cc

index 8abf577304a3654b5c0ff606fb615530ed3e765f..c8b2558fe695611eb3f8ff5bdccdef1c59db575a 100644 (file)
@@ -220,6 +220,7 @@ BOOST_AUTO_TEST_CASE(test_record_types_bad_values) {
      (case_t(QType::A, "932.521.256.42", zone, false)) // hollywood IP
      (case_t(QType::A, "932.521", zone, false)) // truncated IP
      (case_t(QType::A, "\xca\xec\x00", wire, false)) // truncated wire value
+     (case_t(QType::A, "127.0.0.1 evil data", zone, false)) // trailing garbage
      (case_t(QType::AAAA, "23:00", zone, false)) // time when this test was written 
      (case_t(QType::AAAA, "23:00::15::43", zone, false)) // double compression
      (case_t(QType::AAAA, "2a23:00::15::", zone, false)) // ditto