com php-src: Fix #53092 - dns_get_record does not ret urn false on dns server failure: ext/standard/dns .c

From: Date: Mon, 01 Dec 2014 06:42:13 +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-83448@lists.php.net to get a copy of this message
Commit: d037785165854872fc9b3b49ed3290ae25f939e6 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:42:13 -0800 Parents: 2a73d56ef9e1a4ca8cbc9521e98c64a3716bbb4c Branches: PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d037785165854872fc9b3b49ed3290ae25f939e6 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;

« previous php.cvs (#83448) next »