1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-02-08 19:12:49 +00:00

Fix the fix.

Pointed out by:	wollman, bde
This commit is contained in:
Joerg Wunsch 1996-12-13 13:31:12 +00:00
parent 621d611a9d
commit b784c223ee
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=20398

View File

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