summaryrefslogtreecommitdiff
path: root/ext/standard/php_math.h
diff options
context:
space:
mode:
authorAndrea Faulds <ajf@ajf.me>2017-08-19 20:31:54 +0100
committerAndrea Faulds <ajf@ajf.me>2017-08-19 20:31:54 +0100
commit61538ebadc2ac80b29d6b7a9c355615fe0f40492 (patch)
tree1304ae227443cf6eb1ca87a513971f43c1d9e94a /ext/standard/php_math.h
parent3cad07b84fdf8a1ae87cae1a92da12f6f556bdd1 (diff)
downloadphp-git-61538ebadc2ac80b29d6b7a9c355615fe0f40492.tar.gz
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.
Diffstat (limited to 'ext/standard/php_math.h')
0 files changed, 0 insertions, 0 deletions