From: Francois-Xavier Le Bail Date: Fri, 26 Jan 2018 11:29:37 +0000 (+0100) Subject: Replace strcpy() call with strlcpy() call X-Git-Tag: tcpdump-4.99-bp~1351 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/11d0d3299b30276d1ff689d6d1d466759f316e6c Replace strcpy() call with strlcpy() call strcpy() in unsafe. --- diff --git a/addrtoname.c b/addrtoname.c index 55937929..499a6648 100644 --- a/addrtoname.c +++ b/addrtoname.c @@ -172,7 +172,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;