void-packages/srcpkgs/p7zip/patches/CVE-2016-9296.patch
2016-11-22 02:30:01 +01:00

12 lines
476 B
Diff

--- CPP/7zip/Archive/7z/7zIn.cpp.orig Sun Nov 20 09:29:41 2016
+++ CPP/7zip/Archive/7z/7zIn.cpp Sun Nov 20 09:31:22 2016
@@ -1097,7 +1097,8 @@ HRESULT CInArchive::ReadAndDecodePackedStreams(
if (CrcCalc(data, unpackSize) != folders.FolderCRCs.Vals[i])
ThrowIncorrect();
}
- HeadersSize += folders.PackPositions[folders.NumPackStreams];
+ if (folders.PackPositions)
+ HeadersSize += folders.PackPositions[folders.NumPackStreams];
return S_OK;
}