diff options
author | Max Horn | 2009-02-22 16:27:48 +0000 |
---|---|---|
committer | Max Horn | 2009-02-22 16:27:48 +0000 |
commit | c397b37bfb2bbd0cd304e1f45c1323c726a120f2 (patch) | |
tree | aedc521be334ea7d0cbba2cca06366187e3d157a | |
parent | 8fb7fd06814bd3aec3c8af9ce4761db8dfd90460 (diff) | |
download | scummvm-rg350-c397b37bfb2bbd0cd304e1f45c1323c726a120f2.tar.gz scummvm-rg350-c397b37bfb2bbd0cd304e1f45c1323c726a120f2.tar.bz2 scummvm-rg350-c397b37bfb2bbd0cd304e1f45c1323c726a120f2.zip |
Modified ZipArchive::createReadStreamForMember to check whether the zip archive contains a file with the given name
svn-id: r38786
-rw-r--r-- | common/unzip.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/unzip.cpp b/common/unzip.cpp index 0fff54fbe3..9d4ea9d26b 100644 --- a/common/unzip.cpp +++ b/common/unzip.cpp @@ -1432,7 +1432,8 @@ Common::SeekableReadStream *ZipArchive::createReadStreamForMember(const Common:: if (!_zipFile) return 0; - unzLocateFile(_zipFile, name.c_str(), 2); + if (unzLocateFile(_zipFile, name.c_str(), 2) != UNZ_OK) + return 0; unz_file_info fileInfo; unzOpenCurrentFile(_zipFile); |