fixed GH #2661: Poco::Zip::ZipArchive cannot load new tomcat.zip file

This commit is contained in:
Günter Obiltschnig 2019-05-14 09:37:58 +02:00
parent e1435a6620
commit 623f31a62b

View File

@ -126,8 +126,7 @@ void ZipFileInfo::parse(std::istream& inp, bool assumeHeaderRead)
ptr += 2;
if (id == ZipCommon::ZIP64_EXTRA_ID)
{
poco_assert(size >= 8);
if (getUncompressedSizeFromHeader() == ZipCommon::ZIP64_MAGIC)
if (size >= 8 && getUncompressedSizeFromHeader() == ZipCommon::ZIP64_MAGIC)
{
setUncompressedSize(ZipUtil::get64BitValue(ptr, 0));
size -= 8;