diff options
author | Xinchen Hui <laruence@gmail.com> | 2016-05-16 11:19:45 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2016-05-16 11:19:45 +0800 |
commit | 1559fd7e48837b8f91de15e912865baab57bcdb5 (patch) | |
tree | 820516559e494b74023a54a332002cace574b97e /main/network.c | |
parent | fb951553be0175712f4b757e05004110d7421e04 (diff) | |
download | php-git-1559fd7e48837b8f91de15e912865baab57bcdb5.tar.gz |
Fixed bug #72218 (If host name cannot be resolved then PHP 7 crashes)
Diffstat (limited to 'main/network.c')
-rw-r--r-- | main/network.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/network.c b/main/network.c index e7f1b84281..ab6a8ca715 100644 --- a/main/network.c +++ b/main/network.c @@ -253,7 +253,7 @@ PHPAPI int php_network_getaddresses(const char *host, int socktype, struct socka } if (host_info == NULL) { if (error_string) { - error_string = strpprintf(0, "php_network_getaddresses: gethostbyname failed. errno=%d", errno); + *error_string = strpprintf(0, "php_network_getaddresses: gethostbyname failed. errno=%d", errno); php_error_docref(NULL, E_WARNING, "%s", ZSTR_VAL(*error_string)); } else { php_error_docref(NULL, E_WARNING, "php_network_getaddresses: gethostbyname failed"); |