summaryrefslogtreecommitdiff
path: root/addrtoname.c
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-01-26 12:29:37 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2018-01-26 12:30:04 +0100
commit11d0d3299b30276d1ff689d6d1d466759f316e6c (patch)
treeb72a6e6a642d81e3670f581dc7dedc89dcbae209 /addrtoname.c
parent213f7585ebc024fb99c608d96a89b713a8d9e458 (diff)
downloadtcpdump-11d0d3299b30276d1ff689d6d1d466759f316e6c.tar.gz
Replace strcpy() call with strlcpy() call
strcpy() in unsafe.
Diffstat (limited to 'addrtoname.c')
-rw-r--r--addrtoname.c2
1 files changed, 1 insertions, 1 deletions
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;