zend_string *hostname;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_STRING(addr, addr_len)
+ Z_PARAM_PATH(addr, addr_len)
ZEND_PARSE_PARAMETERS_END();
hostname = php_gethostbyaddr(addr);
size_t hostname_len;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_STRING(hostname, hostname_len)
+ Z_PARAM_PATH(hostname, hostname_len)
ZEND_PARSE_PARAMETERS_END();
if (hostname_len > MAXFQDNLEN) {
int i;
ZEND_PARSE_PARAMETERS_START(1, 1)
- Z_PARAM_STRING(hostname, hostname_len)
+ Z_PARAM_PATH(hostname, hostname_len)
ZEND_PARSE_PARAMETERS_END();
if (hostname_len > MAXFQDNLEN) {
--- /dev/null
+--TEST--
+Bug #76755 (setcookie does not accept "double" type for expire time)
+--FILE--
+<?php
+$host = "localhost\0.example.com";
+try {
+ var_dump(gethostbyname($host));
+} catch(Error $e) {
+ print $e->getMessage()."\n";
+}
+try {
+var_dump(gethostbynamel($host));
+} catch(Error $e) {
+ print $e->getMessage()."\n";
+}
+?>
+--EXPECT--
+gethostbyname(): Argument #1 ($hostname) must not contain any null bytes
+gethostbynamel(): Argument #1 ($hostname) must not contain any null bytes
\ No newline at end of file