Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- unify warning between win and unix and enable test

  • Loading branch information...
commit 7e5d92106b6048fae001e718f2a5423544992d49 1 parent d1b156f
@pierrejoye pierrejoye authored
View
5 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;
View
6 ext/standard/tests/network/bug41347.phpt
@@ -1,11 +1,5 @@
--TEST--
dns_check_record() segfault with empty host
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip No windows support');
-}
-?>
--FILE--
<?php
var_dump(dns_check_record(''));
Please sign in to comment.
Something went wrong with that request. Please try again.