diff options
| author | practicalswift <[email protected]> | 2017-01-14 20:18:20 +0100 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2017-01-14 20:18:20 +0100 |
| commit | afab9f47f619120f22e5d586d417c71551f8d000 (patch) | |
| tree | 97022790889f1d635277818c009314458e1ec220 /src/test/addrman_tests.cpp | |
| parent | Merge #9525: test: Include tx data in EXTRA_DIST (diff) | |
| download | discoin-afab9f47f619120f22e5d586d417c71551f8d000.tar.xz discoin-afab9f47f619120f22e5d586d417c71551f8d000.zip | |
[test] Avoid potential NULL pointer dereference in addrman_tests.cpp
Diffstat (limited to 'src/test/addrman_tests.cpp')
| -rw-r--r-- | src/test/addrman_tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/addrman_tests.cpp b/src/test/addrman_tests.cpp index 48313915e..322addc9f 100644 --- a/src/test/addrman_tests.cpp +++ b/src/test/addrman_tests.cpp @@ -297,7 +297,7 @@ BOOST_AUTO_TEST_CASE(addrman_find) // Test 18; Find does not discriminate by port number. CAddrInfo* info2 = addrman.Find(addr2); BOOST_CHECK(info2); - if (info2) + if (info2 && info1) BOOST_CHECK(info2->ToString() == info1->ToString()); // Test 19: Find returns another IP matching what we searched on. |