mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-27 21:33:27 +01:00
dns_utils: fix wrong asserts
Braino.
This commit is contained in:
parent
cf88e4dd24
commit
151c32d5c4
@ -102,7 +102,7 @@ namespace tools
|
|||||||
// fuck it, I'm tired of dealing with getnameinfo()/inet_ntop/etc
|
// fuck it, I'm tired of dealing with getnameinfo()/inet_ntop/etc
|
||||||
std::string ipv4_to_string(const char* src, size_t len)
|
std::string ipv4_to_string(const char* src, size_t len)
|
||||||
{
|
{
|
||||||
assert(memchr(src, 0, len));
|
assert(len >= 4);
|
||||||
|
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
unsigned int bytes[4];
|
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...
|
// stop-gap measure and to make the tests pass at least...
|
||||||
std::string ipv6_to_string(const char* src, size_t len)
|
std::string ipv6_to_string(const char* src, size_t len)
|
||||||
{
|
{
|
||||||
assert(memchr(src, 0, len));
|
assert(len >= 8);
|
||||||
|
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
unsigned int bytes[8];
|
unsigned int bytes[8];
|
||||||
|
Loading…
Reference in New Issue
Block a user