diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-09-27 17:30:40 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-09-27 17:42:32 +0100 |
commit | 151c32d5c49f65ff3fd540e8ae65da88a10f1a9b (patch) | |
tree | 3ea0acce234987e6a9c9af907165a594b504750c /src/common/dns_utils.cpp | |
parent | Merge pull request #394 (diff) | |
download | monero-151c32d5c49f65ff3fd540e8ae65da88a10f1a9b.tar.xz |
dns_utils: fix wrong asserts
Braino.
Diffstat (limited to '')
-rw-r--r-- | src/common/dns_utils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/dns_utils.cpp b/src/common/dns_utils.cpp index 5cb5ed2de..2ae5d9624 100644 --- a/src/common/dns_utils.cpp +++ b/src/common/dns_utils.cpp @@ -102,7 +102,7 @@ namespace tools // fuck it, I'm tired of dealing with getnameinfo()/inet_ntop/etc std::string ipv4_to_string(const char* src, size_t len) { - assert(memchr(src, 0, len)); + assert(len >= 4); std::stringstream ss; unsigned int bytes[4]; @@ -122,7 +122,7 @@ std::string ipv4_to_string(const char* src, size_t len) // stop-gap measure and to make the tests pass at least... std::string ipv6_to_string(const char* src, size_t len) { - assert(memchr(src, 0, len)); + assert(len >= 8); std::stringstream ss; unsigned int bytes[8]; |