From: Nikita Popov Date: Wed, 15 Jul 2020 13:10:50 +0000 (+0200) Subject: Merge branch 'PHP-7.4' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c0ee68b830554fd381c72a74d3276095a69945c;p=php Merge branch 'PHP-7.4' * PHP-7.4: Fix bug #78008: dns_check_record() always return true on Alpine --- 1c0ee68b830554fd381c72a74d3276095a69945c diff --cc ext/standard/dns.c index f77735ed72,3c9ce269c4..625c778d5b --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@@ -350,13 -358,12 +350,11 @@@ static void _php_dns_free_res(struct __ #define php_dns_free_res(__res__) #endif -/* {{{ proto bool dns_check_record(string host [, string type]) - Check DNS records corresponding to a given Internet host name or IP address */ +/* {{{ Check DNS records corresponding to a given Internet host name or IP address */ PHP_FUNCTION(dns_check_record) { - #ifndef MAXPACKET - #define MAXPACKET 8192 /* max packet size used internally by BIND */ - #endif - u_char ans[MAXPACKET]; + HEADER *hp; + querybuf answer; char *hostname, *rectype = NULL; size_t hostname_len, rectype_len = 0; int type = DNS_T_MX, i;