-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug #75097 (gethostname fails if your host name is 64 chars long)
PHP contained two different off-by-one errors, which are fixed here. First, it created a buffer of size HOST_NAME_MAX, not adding space for a null terminator. Second, it subtracted 1 from the size of that buffer when passing its size to gethostname(), despite gethostname() expecting it to be a buffer size including space for a terminating null byte, not a string length.
- Loading branch information
1 parent
3cad07b
commit 61538eb
Showing
2 changed files
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters