diff options
| -rw-r--r-- | engines/kyra/resource.cpp | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index b96b3c00dd..74a858da72 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -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; | 
