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:31 +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-83450@lists.php.net to get a copy of this message
Commit: f2b7aeda2b79b0f2a4f4ba2bcdebe3574b1d3a9e 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:31 -0800 Parents: 2534671f0be23b4bf93f0d726684895af77f39e0 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f2b7aeda2b79b0f2a4f4ba2bcdebe3574b1d3a9e 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 13a1ab7..52b1b1e 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -896,7 +896,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 (#83450) next »