]> The Tcpdump Group git mirrors - tcpdump/blobdiff - addrtoname.c
change make check to work with POSIX shell
[tcpdump] / addrtoname.c
index df7c2cee9461f8e1c081b87a3af34bd619af9985..15e57411f52c6be2c1bee49af3d254014c5bd35d 100644 (file)
@@ -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);
 }