diff options
author | Philip Paeps <philip@FreeBSD.org> | 2019-10-06 04:36:53 +0000 |
---|---|---|
committer | Philip Paeps <philip@FreeBSD.org> | 2019-10-06 04:36:53 +0000 |
commit | f91036a44a189fa5d0b5f1c6dea0a396a0f928c0 (patch) | |
tree | 2cd0554d9f0826a4e0bc63c5e4ca83ece65bee24 /addrtoname.c | |
parent | 810711ec13a9424633df50e0a1af057a68e2ed45 (diff) |
Notes
Diffstat (limited to 'addrtoname.c')
-rw-r--r-- | addrtoname.c | 7 |
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); } |