From 20ea94ba7dca8bed454a1891b2d427d6fd445bcf Mon Sep 17 00:00:00 2001 From: joerg Date: Thu, 12 Dec 1996 21:21:11 +0000 Subject: [PATCH] Fix an embarassing and rather obscure incarnation of an uninitialized local variable use. Found by: actually using ascii2addr() :-/ --- lib/libc/net/ascii2addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;