Another fix related to pr#bin/2585 . That'll teach me to

grep h_length *.c ...
This commit is contained in:
Bill Fenner 1997-02-10 06:46:37 +00:00
parent 184989c210
commit b5b04da46d

View File

@ -347,7 +347,8 @@ interface : ADDR { $$ = $1; }
addrname : ADDR { $$ = $1; }
| STRING { struct hostent *hp;
if ((hp = gethostbyname($1)) == NULL)
if ((hp = gethostbyname($1)) == NULL ||
hp->h_length != sizeof($$))
fatal("No such host %s", $1);
if (hp->h_addr_list[1])