fix #71609: Segmentation fault on ZTS with gethostbyname

This commit is contained in:
Joe Watkins 2016-03-31 12:39:01 +01:00
parent ed06d130f7
commit 233115ea23
10 changed files with 315 additions and 10 deletions

View file

@ -692,7 +692,7 @@ int fcgi_listen(const char *path, int backlog)
if(strlen(host) > MAXFQDNLEN) {
hep = NULL;
} else {
hep = gethostbyname(host);
hep = php_network_gethostbyname(host);
}
if (!hep || hep->h_addrtype != AF_INET || !hep->h_addr_list[0]) {
fcgi_log(FCGI_ERROR, "Cannot resolve host name '%s'!\n", host);