From: Pierre Joye Date: Sun, 4 Sep 2011 21:48:22 +0000 (+0000) Subject: - unify warning between win and unix and enable test X-Git-Tag: php-5.5.0alpha1~1355 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=861dac9726e9f024787e4929373c175df43c786c;p=php - unify warning between win and unix and enable test --- diff --git a/ext/standard/dns_win32.c b/ext/standard/dns_win32.c index 7bded1cdaf..2dbf3e2e1d 100644 --- a/ext/standard/dns_win32.c +++ b/ext/standard/dns_win32.c @@ -103,6 +103,11 @@ PHP_FUNCTION(dns_check_record) return; } + if (hostname_len == 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Host cannot be empty"); + RETURN_FALSE; + } + if (rectype) { if (!strcasecmp("A", rectype)) type = DNS_TYPE_A; else if (!strcasecmp("NS", rectype)) type = DNS_TYPE_NS; diff --git a/ext/standard/tests/network/bug41347.phpt b/ext/standard/tests/network/bug41347.phpt index 21fc002fa5..6ece098191 100644 --- a/ext/standard/tests/network/bug41347.phpt +++ b/ext/standard/tests/network/bug41347.phpt @@ -1,11 +1,5 @@ --TEST-- dns_check_record() segfault with empty host ---SKIPIF-- - --FILE--