Skip to content

Commit

Permalink
Merge branch 'PHP-7.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
hikari-no-yume committed Aug 19, 2017
2 parents e33259f + ccb09d2 commit 80d17cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/standard/dns.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,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;
}
Expand Down

0 comments on commit 80d17cb

Please sign in to comment.