summaryrefslogtreecommitdiff
path: root/src/dns.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dns.cpp')
-rw-r--r--src/dns.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dns.cpp b/src/dns.cpp
index 977f4bad0..75e5731fe 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -677,7 +677,13 @@ DNSResult DNS::GetResult()
case DNS_QUERY_AAAA:
{
- inet_ntop(AF_INET6, data.first, formatted, sizeof(formatted));
+ if (!inet_ntop(AF_INET6, data.first, formatted, sizeof(formatted)))
+ {
+ std::string ro = req->orig;
+ delete req;
+ return DNSResult(this_id | ERROR_MASK, "inet_ntop() failed", 0, ro);
+ }
+
resultstr = formatted;
/* Special case. Sending ::1 around between servers