mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-22 18:37:01 +00:00
Added another check if PAK file is corrupted.
svn-id: r30833
This commit is contained in:
parent
166698d29d
commit
40b19365be
@ -415,6 +415,12 @@ bool ResLoaderPak::loadFile(const Common::String &filename, Common::SeekableRead
|
||||
}
|
||||
|
||||
while (!stream.eos()) {
|
||||
// The start offset of a file should never be in the filelist
|
||||
if (startoffset < stream.pos()) {
|
||||
warning("PAK file '%s' is corrupted", filename.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
Common::String file = "";
|
||||
byte c = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user