From 7e5d92106b6048fae001e718f2a5423544992d49 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Sun, 4 Sep 2011 21:48:22 +0000 Subject: [PATCH] - unify warning between win and unix and enable test --- ext/standard/dns_win32.c | 5 +++++ ext/standard/tests/network/bug41347.phpt | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ext/standard/dns_win32.c b/ext/standard/dns_win32.c index 7bded1cdafdba..2dbf3e2e1da70 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 21fc002fa53eb..6ece098191de5 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--