mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-02-07 07:41:09 +00:00
More bounds checking.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2950 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
9bda9e9fc1
commit
74c6f76f50
1 changed files with 4 additions and 1 deletions
|
@ -953,10 +953,13 @@ void FindNextChunk(char *name)
|
||||||
data_p = NULL;
|
data_p = NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
dataleft-= iff_chunk_len;
|
||||||
// if (iff_chunk_len > 1024*1024)
|
// if (iff_chunk_len > 1024*1024)
|
||||||
// Sys_Error ("FindNextChunk: %i length is past the 1 meg sanity limit", iff_chunk_len);
|
// Sys_Error ("FindNextChunk: %i length is past the 1 meg sanity limit", iff_chunk_len);
|
||||||
data_p -= 8;
|
data_p -= 8;
|
||||||
last_chunk = data_p + 8 + ( (iff_chunk_len + 1) & ~1 );
|
last_chunk = data_p + 8 + iff_chunk_len;
|
||||||
|
if ((iff_chunk_len&1) && dataleft)
|
||||||
|
last_chunk++;
|
||||||
if (!Q_strncmp(data_p, name, 4))
|
if (!Q_strncmp(data_p, name, 4))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue