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 2000-07-03 02:33:02 +00:00
parent 9d75443679
commit 991a8601b5

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;