|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-01-12 15:48 UTC] bugreports at internot dot info
Description: ------------ Hi, In /sapi/litespeed/lsapilib.c: 3114 pw = getpwnam( "nobody" ); is not checked against NULL, as it is everywhere else. This may cause a null pointer dereference. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 04:00:02 2025 UTC |
Fix has been committed. You can apply following patch diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c index baf0db3..a109909 100644 @@ -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; }