summaryrefslogtreecommitdiffstats
path: root/freebsd/contrib/tcpdump/addrtoname.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/contrib/tcpdump/addrtoname.c')
-rw-r--r--freebsd/contrib/tcpdump/addrtoname.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/freebsd/contrib/tcpdump/addrtoname.c b/freebsd/contrib/tcpdump/addrtoname.c
index e182b22a..50516cdd 100644
--- a/freebsd/contrib/tcpdump/addrtoname.c
+++ b/freebsd/contrib/tcpdump/addrtoname.c
@@ -131,7 +131,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;
@@ -1253,10 +1253,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);
}