termux-packages/packages/p7zip/1-CVE-2016-9296.patch
2019-03-10 21:32:17 +01:00

14 lines
561 B
Diff

diff -Nur p7zip/CPP/7zip/Archive/7z/7zIn.cpp CVE-2016-9296_mod/CPP/7zip/Archive/7z/7zIn.cpp
--- p7zip/CPP/7zip/Archive/7z/7zIn.cpp 2016-05-20 16:20:03.000000000 +0800
+++ CVE-2016-9296_mod/CPP/7zip/Archive/7z/7zIn.cpp 2019-03-06 22:03:43.370014466 +0800
@@ -1097,7 +1097,8 @@
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;
}