X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fnetwork%2Finet_ntop.c;h=ca3334375128e086bcd49ec6e7c941de769d4ec8;hb=2eaed464e2080d8321d3903b71086a1ecfc4ee4a;hp=e9e2823f44f0299ec35417ea6253c16cf45f362e;hpb=1cd417bdf10366d63cc875e285c6418709a58c17;p=musl diff --git a/src/network/inet_ntop.c b/src/network/inet_ntop.c index e9e2823f..ca333437 100644 --- a/src/network/inet_ntop.c +++ b/src/network/inet_ntop.c @@ -40,7 +40,7 @@ const char *inet_ntop(int af, const void *restrict a0, char *restrict s, socklen } if (max>2) { buf[best] = buf[best+1] = ':'; - strcpy(buf+best+2, buf+best+max); + memmove(buf+best+2, buf+best+max, i-best-max+1); } if (strlen(buf) < l) { strcpy(s, buf);