Mem_Free (buffer);
if (
- eocd->cdir_size < 0 || eocd->cdir_size > filesize ||
- eocd->cdir_offset < 0 || eocd->cdir_offset >= filesize ||
+ eocd->cdir_size > filesize ||
+ eocd->cdir_offset >= filesize ||
eocd->cdir_offset + eocd->cdir_size > filesize
)
{
const char *FS_CheckGameDir(const char *gamedir)
{
const char *ret;
- char buf[8192];
+ static char buf[8192];
char vabuf[1024];
if (FS_CheckNastyPath(gamedir, true))
{
if (lseek (file->handle, file->buff_ind - file->buff_len, SEEK_CUR) == -1)
{
- Con_Printf("WARNING: could not seek in %s.\n");
+ Con_Printf("WARNING: could not seek in %s.\n", file->filename);
}
}
// if path doesn't have a .EXT, append extension
// (extension should include the .)
- src = path + strlen(path) - 1;
+ src = path + strlen(path);
while (*src != '/' && src != path)
{