cvs: php-src /ext/standard dns.c
| From: | Sara Golemon | Date: | Mon, 01 Sep 2003 22:38:40 +0000 |
| Subject: | cvs: php-src /ext/standard dns.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-23552@lists.php.net to get a copy of this message | ||
pollita Mon Sep 1 18:38:40 2003 EDT
Modified files:
/php-src/ext/standard dns.c
Log:
MFB: Plug leak when invalid domain name provided.
Index: php-src/ext/standard/dns.c
diff -u php-src/ext/standard/dns.c:1.61 php-src/ext/standard/dns.c:1.62
--- php-src/ext/standard/dns.c:1.61 Tue Jun 10 16:03:37 2003
+++ php-src/ext/standard/dns.c Mon Sep 1 18:38:40 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dns.c,v 1.61 2003/06/10 20:03:37 imajes Exp $ */
+/* $Id: dns.c,v 1.62 2003/09/01 22:38:40 pollita Exp $ */
/* {{{ includes */
#include "php.h"
@@ -173,12 +173,12 @@
}
convert_to_string_ex(arg);
- array_init(return_value);
-
hp = gethostbyname(Z_STRVAL_PP(arg));
if (hp == NULL || hp->h_addr_list == NULL) {
RETURN_FALSE;
}
+
+ array_init(return_value);
for (i = 0 ; hp->h_addr_list[i] != 0 ; i++) {
in = *(struct in_addr *) hp->h_addr_list[i];