mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Fix nullptr dereference in front of nullptr check in FS_CheckPak0
Found using LLVM sanitizer. Reported by Dominic "lonkamikaze" Fandrey and David "devnexen" CARLIER.
This commit is contained in:
parent
9f294ce520
commit
4ea0eebfe5
1 changed files with 2 additions and 2 deletions
|
@ -3458,17 +3458,17 @@ static void FS_CheckPak0( void )
|
|||
{
|
||||
searchpath_t *path;
|
||||
pack_t *curpack;
|
||||
const char *pakBasename;
|
||||
qboolean founddemo = qfalse;
|
||||
unsigned int foundPak = 0, foundTA = 0;
|
||||
|
||||
for( path = fs_searchpaths; path; path = path->next )
|
||||
{
|
||||
const char* pakBasename = path->pack->pakBasename;
|
||||
|
||||
if(!path->pack)
|
||||
continue;
|
||||
|
||||
curpack = path->pack;
|
||||
pakBasename = curpack->pakBasename;
|
||||
|
||||
if(!Q_stricmpn( curpack->pakGamename, "demoq3", MAX_OSPATH )
|
||||
&& !Q_stricmpn( pakBasename, "pak0", MAX_OSPATH ))
|
||||
|
|
Loading…
Reference in a new issue