diff --git a/lib/libc/net/ascii2addr.c b/lib/libc/net/ascii2addr.c index 27d62459052d..415d07de7861 100644 --- a/lib/libc/net/ascii2addr.c +++ b/lib/libc/net/ascii2addr.c @@ -51,7 +51,7 @@ ascii2addr(af, ascii, result) switch(af) { case AF_INET: ina = result; - strncat(strbuf, ascii, (sizeof strbuf)-1); + strncpy(strbuf, ascii, (sizeof strbuf)-1); if (inet_aton(strbuf, ina)) return sizeof(struct in_addr); errno = EINVAL;