com php-src: Fix #53092 - dns_get_record does not ret urn false on dns server failure: ext/standard/dns .c
| From: | Stanislav Malyshev | Date: | Mon, 01 Dec 2014 06:39:09 +0000 |
| Subject: | com php-src: Fix #53092 - dns_get_record does not ret urn false on dns server failure: ext/standard/dns .c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-83442@lists.php.net to get a copy of this message | ||
Commit: 7b44790db557517618ddd21d90740f290b8cb29d
Author: Tjerk Meesters <datibbaw@php.net> Sun, 13 Jul 2014 18:23:25 +0800
Committer: Stanislav Malyshev <stas@php.net> Sun, 30 Nov 2014 22:39:09 -0800
Parents: a87300241fc065c0020c7caf7a0e2e9b57405ad0
Branches: PHP-5.5
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7b44790db557517618ddd21d90740f290b8cb29d
Log:
Fix #53092 - dns_get_record does not return false on dns server failure
Bugs:
https://bugs.php.net/53092
Changed paths:
M ext/standard/dns.c
Diff:
diff --git a/ext/standard/dns.c b/ext/standard/dns.c
index 0b5e69c..79e5f1a 100644
--- a/ext/standard/dns.c
+++ b/ext/standard/dns.c
@@ -897,7 +897,13 @@ PHP_FUNCTION(dns_get_record)
if (n < 0) {
php_dns_free_handle(handle);
- continue;
+ if (h_errno == NO_DATA) {
+ continue;
+ } else {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Dns Query failed");
+ zval_dtor(return_value);
+ RETURN_FALSE;
+ }
}
cp = answer.qb2 + HFIXEDSZ;