diff options
Diffstat (limited to 'ext/standard/dns.c')
| -rw-r--r-- | ext/standard/dns.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/standard/dns.c b/ext/standard/dns.c index bb5f9109ed..8b93b717c6 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -222,9 +222,9 @@ PHP_FUNCTION(gethostbyname) return; } - if(hostname_len > MAXHOSTNAMELEN) { + if(hostname_len > MAXFQDNLEN) { /* name too long, protect from CVE-2015-0235 */ - php_error_docref(NULL, E_WARNING, "Host name is too long, the limit is %d characters", MAXHOSTNAMELEN); + php_error_docref(NULL, E_WARNING, "Host name is too long, the limit is %d characters", MAXFQDNLEN); RETURN_STRINGL(hostname, hostname_len, 1); } addr = php_gethostbyname(hostname); @@ -247,9 +247,9 @@ PHP_FUNCTION(gethostbynamel) return; } - if(hostname_len > MAXHOSTNAMELEN) { + if(hostname_len > MAXFQDNLEN) { /* name too long, protect from CVE-2015-0235 */ - php_error_docref(NULL, E_WARNING, "Host name is too long, the limit is %d characters", MAXHOSTNAMELEN); + php_error_docref(NULL, E_WARNING, "Host name is too long, the limit is %d characters", MAXFQDNLEN); RETURN_FALSE; } |
