mirror of
https://github.com/php/php-src.git
synced 2026-04-15 12:01:07 +02:00
Merge branch 'PHP-7.0' into PHP-7.1
This commit is contained in:
2
NEWS
2
NEWS
@@ -8,6 +8,8 @@ PHP NEWS
|
||||
- CURL:
|
||||
. Fixed bug #75093 (OpenSSL support not detected). (Remi)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #75097 (gethostname fails if your host name is 64 chars long). (Andrea)
|
||||
|
||||
31 Aug 2017, PHP 7.1.9
|
||||
|
||||
|
||||
@@ -131,13 +131,13 @@ static zend_string *php_gethostbyname(char *name);
|
||||
Get the host name of the current machine */
|
||||
PHP_FUNCTION(gethostname)
|
||||
{
|
||||
char buf[HOST_NAME_MAX];
|
||||
char buf[HOST_NAME_MAX + 1];
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (gethostname(buf, sizeof(buf) - 1)) {
|
||||
if (gethostname(buf, sizeof(buf))) {
|
||||
php_error_docref(NULL, E_WARNING, "unable to fetch host [%d]: %s", errno, strerror(errno));
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user