diff options
author | Stanislav Malyshev <stas@php.net> | 2015-01-31 21:47:22 -0800 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2015-01-31 21:48:14 -0800 |
commit | af1f867308ca68e82a2143f62ecd7a6f7b19ba2a (patch) | |
tree | 421421ca2b706e063eafdc2f0ea38b0037139bf1 /sapi/cgi/fastcgi.c | |
parent | 882a375dbad4ecb1fddd9dd80f1a1350299629c1 (diff) | |
parent | b30a6d6018705e0a9d345192eba8125ff854c167 (diff) | |
download | php-git-af1f867308ca68e82a2143f62ecd7a6f7b19ba2a.tar.gz |
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
Use better constant since MAXHOSTNAMELEN may mean shorter name
use right sizeof for memset
Diffstat (limited to 'sapi/cgi/fastcgi.c')
-rw-r--r-- | sapi/cgi/fastcgi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c index 7d39d6139b..98d503ec72 100644 --- a/sapi/cgi/fastcgi.c +++ b/sapi/cgi/fastcgi.c @@ -27,6 +27,10 @@ #include <stdarg.h> #include <errno.h> +#ifndef MAXFQDNLEN +#define MAXFQDNLEN 255 +#endif + #ifdef _WIN32 #include <windows.h> @@ -611,7 +615,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); |