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:
Kris Kennaway 2000-07-03 02:33:02 +00:00
parent a5dbb3f4b7
commit dc578f2564
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=62427

View File

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