X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/09b6f4b00d5a953c10f7a1c3b0325ab67204be43..204f4f4d091890d9106e744cffb9561e82df44ad:/lib/inet_ntop.c diff --git a/lib/inet_ntop.c b/lib/inet_ntop.c index 7866999a..15e3ebd3 100644 --- a/lib/inet_ntop.c +++ b/lib/inet_ntop.c @@ -81,7 +81,7 @@ inet_ntop4(const unsigned char *src, char *dst, size_t size) errno = ENOSPC; return (NULL); } - strcpy(dst, tmp); + memcpy(dst, tmp, len + 1); return (dst); } @@ -178,7 +178,7 @@ inet_ntop6(const unsigned char *src, char *dst, size_t size) errno = ENOSPC; return (NULL); } - strcpy(dst, tmp); + memcpy(dst, tmp, tp - tmp); return (dst); } #endif /* AF_INET6 */