cvs: php4 /main network.c
| From: | Derick Rethans | Date: | Mon, 21 Jan 2002 07:54:57 +0000 |
| Subject: | cvs: php4 /main network.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-9120@lists.php.net to get a copy of this message | ||
derick Mon Jan 21 02:54:57 2002 EDT
Modified files:
/php4/main network.c
Log:
- Fix for bug #15057: getimagesize() crashes when offline (on MacOSX)
Index: php4/main/network.c
diff -u php4/main/network.c:1.26 php4/main/network.c:1.27
--- php4/main/network.c:1.26 Sun Jan 6 17:45:43 2002
+++ php4/main/network.c Mon Jan 21 02:54:56 2002
@@ -15,7 +15,7 @@
| Authors: Stig Venaas <venaas@uninett.no> |
+----------------------------------------------------------------------+
*/
-/* $Id: network.c,v 1.26 2002/01/06 22:45:43 venaas Exp $ */
+/* $Id: network.c,v 1.27 2002/01/21 07:54:56 derick Exp $ */
#include "php.h"
@@ -149,6 +149,9 @@
hints.ai_family = AF_UNSPEC;
if ((n = getaddrinfo(host, NULL, &hints, &res))) {
php_error(E_WARNING, "php_network_getaddresses: getaddrinfo failed: %s",
PHP_GAI_STRERROR(n));
+ return 0;
+ } else if (res == NULL) {
+ php_error(E_WARNING, "php_network_getaddresses: getaddrinfo failed (null result
pointer)");
return 0;
}