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 3d436cd589
commit cdd9fd70c4

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;