com php-src: Fixed bug #72218 (If host name cannot be resolved then PHP 7 crashes): NEWS main/network.c

From: Date: Mon, 16 May 2016 03:19:45 +0000
Subject: com php-src: Fixed bug #72218 (If host name cannot be resolved then PHP 7 crashes): NEWS main/network.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-92140@lists.php.net to get a copy of this message
Commit: 1559fd7e48837b8f91de15e912865baab57bcdb5 Author: Xinchen Hui <laruence@gmail.com> Mon, 16 May 2016 11:19:45 +0800 Parents: fb951553be0175712f4b757e05004110d7421e04 Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1559fd7e48837b8f91de15e912865baab57bcdb5 Log: Fixed bug #72218 (If host name cannot be resolved then PHP 7 crashes) Bugs: https://bugs.php.net/72218 Changed paths: M NEWS M main/network.c Diff: diff --git a/NEWS b/NEWS index d102d60..480f57e 100644 --- a/NEWS +++ b/NEWS @@ -2,10 +2,14 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2016 PHP 7.0.8 -- Intl +- Core: + . Fixed bug #72218 (If host name cannot be resolved then PHP 7 crashes). + (Laruence) + +- Intl: . Fixed bug #64524 (Add intl.use_exceptions to php.ini-*). (Anatol) -- PCRE +- PCRE: . Fixed bug #72143 (preg_replace uses int instead of size_t). (Joe) - PDO_pgsql: diff --git a/main/network.c b/main/network.c index e7f1b84..ab6a8ca 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");

« previous php.cvs (#92140) next »