aboutsummaryrefslogtreecommitdiffstats
path: root/addrtoname.c
diff options
context:
space:
mode:
Diffstat (limited to 'addrtoname.c')
-rw-r--r--addrtoname.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/addrtoname.c b/addrtoname.c
index df7c2cee9461..15e57411f52c 100644
--- a/addrtoname.c
+++ b/addrtoname.c
@@ -120,7 +120,7 @@ win32_gethostbyaddr(const char *addr, int len, int type)
hname, sizeof(hname), NULL, 0, 0)) {
return NULL;
} else {
- strcpy(host.h_name, hname);
+ strlcpy(host.h_name, hname, NI_MAXHOST);
return &host;
}
break;
@@ -1226,10 +1226,7 @@ dnaddr_string(netdissect_options *ndo, u_short dnaddr)
tp->addr = dnaddr;
tp->nxt = newhnamemem(ndo);
- if (ndo->ndo_nflag)
- tp->name = dnnum_string(ndo, dnaddr);
- else
- tp->name = dnname_string(ndo, dnaddr);
+ tp->name = dnnum_string(ndo, dnaddr);
return(tp->name);
}