aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMax Horn2009-02-22 16:27:48 +0000
committerMax Horn2009-02-22 16:27:48 +0000
commitc397b37bfb2bbd0cd304e1f45c1323c726a120f2 (patch)
treeaedc521be334ea7d0cbba2cca06366187e3d157a /common
parent8fb7fd06814bd3aec3c8af9ce4761db8dfd90460 (diff)
downloadscummvm-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
Diffstat (limited to 'common')
-rw-r--r--common/unzip.cpp3
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);