From 36e6f0d996f5967a0d3a2f5072b5dadb05aee76c Mon Sep 17 00:00:00 2001 From: Alex Zolotarev Date: Tue, 18 Aug 2015 22:02:33 +0300 Subject: [PATCH] Fixed not handled error case in ZipReader. --- coding/zip_reader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coding/zip_reader.cpp b/coding/zip_reader.cpp index 773096eb28..a2a59b8178 100644 --- a/coding/zip_reader.cpp +++ b/coding/zip_reader.cpp @@ -30,7 +30,7 @@ ZipFileReader::ZipFileReader(string const & container, string const & file, uint64_t const offset = unzGetCurrentFileZStreamPos64(zip); (void) unzCloseCurrentFile(zip); - if (offset > Size()) + if (offset == 0 || offset > Size()) MYTHROW(LocateZipException, ("Invalid offset inside zip", file)); unz_file_info64 fileInfo;