From c397b37bfb2bbd0cd304e1f45c1323c726a120f2 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 22 Feb 2009 16:27:48 +0000 Subject: Modified ZipArchive::createReadStreamForMember to check whether the zip archive contains a file with the given name svn-id: r38786 --- common/unzip.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common') 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); -- cgit v1.2.3