Fix an embarassing and rather obscure incarnation of an uninitialized

local variable use.

Found by:	actually using ascii2addr() :-/
This commit is contained in:
joerg 1996-12-12 21:21:11 +00:00
parent 48b07dc365
commit 20ea94ba7d

View File

@ -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;