mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-14 17:01:22 +00:00
must make sure *gzfile gets nulled on error
This commit is contained in:
parent
d430cdcbff
commit
9c43a43bb3
1 changed files with 2 additions and 2 deletions
|
@ -592,7 +592,7 @@ _COM_FOpenFile (const char *filename, VFile **gzfile, char *foundname, int zip)
|
||||||
// make sure they're not trying to do wierd stuff with our private files
|
// make sure they're not trying to do wierd stuff with our private files
|
||||||
if (contains_updir(filename)) {
|
if (contains_updir(filename)) {
|
||||||
Con_Printf ("FindFile: %s: attempt to escape directory tree!\n", filename);
|
Con_Printf ("FindFile: %s: attempt to escape directory tree!\n", filename);
|
||||||
return -1;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -648,7 +648,7 @@ _COM_FOpenFile (const char *filename, VFile **gzfile, char *foundname, int zip)
|
||||||
}
|
}
|
||||||
|
|
||||||
Con_DPrintf ("FindFile: can't find %s\n", filename);
|
Con_DPrintf ("FindFile: can't find %s\n", filename);
|
||||||
|
error:
|
||||||
*gzfile = NULL;
|
*gzfile = NULL;
|
||||||
com_filesize = -1;
|
com_filesize = -1;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue