com php-src: Fixed Buf #68812 Unchecked return value.: sapi/litespeed/lsapilib.c

From: Date: Mon, 08 Jun 2015 19:47:11 +0000
Subject: com php-src: Fixed Buf #68812 Unchecked return value.: sapi/litespeed/lsapilib.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87106@lists.php.net to get a copy of this message
Commit: 81ab4b12aa66b6758f75ab0d6f08a28cde4aeb20 Author: George Wang <gwang@php.net> Mon, 8 Jun 2015 15:38:59 -0400 Parents: c8cf54719f00705d593ceda29914f1eb9f4c4b2f Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=81ab4b12aa66b6758f75ab0d6f08a28cde4aeb20 Log: Fixed Buf #68812 Unchecked return value. Bugs: https://bugs.php.net/68812 Changed paths: M sapi/litespeed/lsapilib.c Diff: diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c index 89ef6df..d6d1c10 100644 --- a/sapi/litespeed/lsapilib.c +++ b/sapi/litespeed/lsapilib.c @@ -3131,10 +3131,20 @@ static int lsapi_initSuEXEC() if ( !s_defaultUid || !s_defaultGid ) { pw = getpwnam( "nobody" ); - if ( !s_defaultUid ) - s_defaultUid = pw->pw_uid; - if ( !s_defaultGid ) - s_defaultGid = pw->pw_gid; + if ( pw ) + { + if ( !s_defaultUid ) + s_defaultUid = pw->pw_uid; + if ( !s_defaultGid ) + s_defaultGid = pw->pw_gid; + } + else + { + if ( !s_defaultUid ) + s_defaultUid = 10000; + if ( !s_defaultGid ) + s_defaultGid = 10000; + } } return 0; }

« previous php.cvs (#87106) next »