diff options
author | Xinchen Hui <laruence@php.net> | 2015-02-27 12:00:52 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2015-02-27 12:00:52 +0800 |
commit | ebfc49aa918044e65b3704933224a807d98b4e68 (patch) | |
tree | ae29bb4cc418a29847c8081a97c8efbdd195292e | |
parent | 3e82816ba1a82843a352ce4050b2010fd9932dee (diff) | |
download | php-git-ebfc49aa918044e65b3704933224a807d98b4e68.tar.gz |
Fixed bug #69121 (Segfault in get_current_user when script owner is not in passwd with ZTS build)
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | main/main.c | 5 |
2 files changed, 7 insertions, 0 deletions
@@ -3,6 +3,8 @@ PHP NEWS ?? ??? 2015, PHP 5.5.23 - Core: + . Fixed bug #69121 (Segfault in get_current_user when script owner is not + in passwd with ZTS build). (dan at syneto dot net) . Fixed bug #65593 (Segfault when calling ob_start from output buffering callback). (Mike) . Fixed bug #69017 (Fail to push to the empty array with the constant value diff --git a/main/main.c b/main/main.c index 733786e447..1f6c4cf04d 100644 --- a/main/main.c +++ b/main/main.c @@ -1247,6 +1247,11 @@ PHPAPI char *php_get_current_user(TSRMLS_D) return ""; } pwd = &_pw; + + if (retpwptr == NULL) { + efree(pwbuf); + return ""; + } #else if ((pwd=getpwuid(pstat->st_uid))==NULL) { return ""; |