summaryrefslogtreecommitdiff
path: root/src/network/getnameinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/getnameinfo.c')
-rw-r--r--src/network/getnameinfo.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/network/getnameinfo.c b/src/network/getnameinfo.c
index 588ed765..2ba66e33 100644
--- a/src/network/getnameinfo.c
+++ b/src/network/getnameinfo.c
@@ -113,11 +113,10 @@ static void reverse_services(char *buf, int port, int dgram)
static int dns_parse_callback(void *c, int rr, const void *data, int len, const void *packet)
{
- char tmp[256];
if (rr != RR_PTR) return 0;
if (__dn_expand(packet, (const unsigned char *)packet + 512,
- data, tmp, sizeof tmp) > 0)
- strcpy(c, tmp);
+ data, c, 256) <= 0)
+ *(char *)c = 0;
return 0;
}