diff options
author | joerg <joerg@FreeBSD.org> | 1996-12-13 13:31:12 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1996-12-13 13:31:12 +0000 |
commit | 8f51351988bc899b89223df15506d9533024f8bd (patch) | |
tree | d4248b523d94653618a31a1625f13f9e9d944535 /lib | |
parent | a2378a9d0cfba9ea8ba4f4f5f58e8bb4c9013472 (diff) | |
download | FreeBSD-src-8f51351988bc899b89223df15506d9533024f8bd.zip FreeBSD-src-8f51351988bc899b89223df15506d9533024f8bd.tar.gz |
Fix the fix.
Pointed out by: wollman, bde
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/net/ascii2addr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/net/ascii2addr.c b/lib/libc/net/ascii2addr.c index 415d07d..0b5bab4 100644 --- a/lib/libc/net/ascii2addr.c +++ b/lib/libc/net/ascii2addr.c @@ -51,7 +51,8 @@ ascii2addr(af, ascii, result) switch(af) { case AF_INET: ina = result; - strncpy(strbuf, ascii, (sizeof strbuf)-1); + strbuf[0] = '\0'; + strncat(strbuf, ascii, (sizeof strbuf)-1); if (inet_aton(strbuf, ina)) return sizeof(struct in_addr); errno = EINVAL; |