mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-24 06:30:10 +01:00
tests: Add tests to make sure lookup methods fail on std::string parameters with embedded NUL characters
This commit is contained in:
@@ -99,6 +99,8 @@ BOOST_AUTO_TEST_CASE(caddrdb_read)
|
||||
BOOST_CHECK(Lookup("250.7.1.1", addr1, 8333, false));
|
||||
BOOST_CHECK(Lookup("250.7.2.2", addr2, 9999, false));
|
||||
BOOST_CHECK(Lookup("250.7.3.3", addr3, 9999, false));
|
||||
BOOST_CHECK(Lookup(std::string("250.7.3.3", 9), addr3, 9999, false));
|
||||
BOOST_CHECK(!Lookup(std::string("250.7.3.3\0example.com", 21), addr3, 9999, false));
|
||||
|
||||
// Add three addresses to new table.
|
||||
CService source;
|
||||
|
||||
Reference in New Issue
Block a user