From 11d0d3299b30276d1ff689d6d1d466759f316e6c Mon Sep 17 00:00:00 2001 From: Francois-Xavier Le Bail Date: Fri, 26 Jan 2018 12:29:37 +0100 Subject: Replace strcpy() call with strlcpy() call strcpy() in unsafe. --- addrtoname.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addrtoname.c') 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; -- cgit v1.2.1