mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 03:49:02 +00:00
Fix a nasty bug which would leave the struct hostent incompletely filled out
when parsing certain DNS records during a reverse address resolution. Thus when code tries to examine the returned host name, it dereferences a null pointer :-( Problem noticed by: ps
This commit is contained in:
parent
a5dbb3f4b7
commit
dc578f2564
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=62427
@ -1185,7 +1185,7 @@ getanswer(answer, anslen, qname, qtype, template, errp)
|
||||
continue;
|
||||
}
|
||||
strcpy(bp, tbuf);
|
||||
tname = bp;
|
||||
template->h_name = bp;
|
||||
bp += n;
|
||||
buflen -= n;
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user