diff options
| author | Joerg Wunsch <joerg@FreeBSD.org> | 1996-12-13 13:31:12 +0000 |
|---|---|---|
| committer | Joerg Wunsch <joerg@FreeBSD.org> | 1996-12-13 13:31:12 +0000 |
| commit | b784c223ee8112f71e39a07dfd994a98e6c5db1b (patch) | |
| tree | d4248b523d94653618a31a1625f13f9e9d944535 /lib/libc/net/ascii2addr.c | |
| parent | 621d611a9d9530d3ff0d9741b3b1779afceb8274 (diff) | |
Notes
Diffstat (limited to 'lib/libc/net/ascii2addr.c')
| -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 415d07de7861..0b5bab427fab 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; |
