mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-14 14:55:41 +00:00
Fix an embarassing and rather obscure incarnation of an uninitialized
local variable use. Found by: actually using ascii2addr() :-/
This commit is contained in:
parent
40e60c63b3
commit
4d224b7f55
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=20375
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user