Merge branch 'PHP-5.6'

* PHP-5.6:
  Use better constant since MAXHOSTNAMELEN may mean shorter name
  use right sizeof for memset

Conflicts:
	ext/sockets/sockaddr_conv.c
	ext/standard/dns.c
This commit is contained in:
Stanislav Malyshev 2015-01-31 21:50:08 -08:00
commit 141b14454c
7 changed files with 19 additions and 19 deletions

View file

@ -28,6 +28,10 @@
#include <stdarg.h>
#include <errno.h>
#ifndef MAXFQDNLEN
#define MAXFQDNLEN 255
#endif
#ifdef _WIN32
#include <windows.h>
@ -616,7 +620,7 @@ int fcgi_listen(const char *path, int backlog)
if (sa.sa_inet.sin_addr.s_addr == INADDR_NONE) {
struct hostent *hep;
if(strlen(host) > MAXHOSTNAMELEN) {
if(strlen(host) > MAXFQDNLEN) {
hep = NULL;
} else {
hep = gethostbyname(host);