summaryrefslogtreecommitdiff
path: root/libre/p7zip/CVE-2016-2335.patch
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-05-18 13:56:12 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-05-18 13:56:12 -0300
commit2da69a08ce12325672e852ac2980ad25301242f6 (patch)
tree529e090e1fb5041f93c69724c6be3039d7e85bd7 /libre/p7zip/CVE-2016-2335.patch
parent68d8d43e92130b5a224bf0ea0b3308a11f86b790 (diff)
downloadabslibre-2da69a08ce12325672e852ac2980ad25301242f6.tar.gz
abslibre-2da69a08ce12325672e852ac2980ad25301242f6.tar.bz2
abslibre-2da69a08ce12325672e852ac2980ad25301242f6.zip
p7zip-15.14.1-2.parabola1: add patches for CVE-2016-2334 and CVE-2016-2335
Diffstat (limited to 'libre/p7zip/CVE-2016-2335.patch')
-rw-r--r--libre/p7zip/CVE-2016-2335.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/libre/p7zip/CVE-2016-2335.patch b/libre/p7zip/CVE-2016-2335.patch
new file mode 100644
index 000000000..a00d6a386
--- /dev/null
+++ b/libre/p7zip/CVE-2016-2335.patch
@@ -0,0 +1,17 @@
+Index: p7zip_15.14.1/CPP/7zip/Archive/Udf/UdfIn.cpp
+===================================================================
+--- p7zip_15.14.1.orig/CPP/7zip/Archive/Udf/UdfIn.cpp
++++ p7zip_15.14.1/CPP/7zip/Archive/Udf/UdfIn.cpp
+@@ -389,7 +389,11 @@ HRESULT CInArchive::ReadFileItem(int vol
+ return S_FALSE;
+ CFile &file = Files.Back();
+ const CLogVol &vol = LogVols[volIndex];
+- CPartition &partition = Partitions[vol.PartitionMaps[lad.Location.PartitionRef].PartitionIndex];
++ unsigned partitionRef = lad.Location.PartitionRef;
++
++ if (partitionRef >= vol.PartitionMaps.Size())
++ return S_FALSE;
++ CPartition &partition = Partitions[vol.PartitionMaps[partitionRef].PartitionIndex];
+
+ UInt32 key = lad.Location.Pos;
+ UInt32 value;