aboutsummaryrefslogtreecommitdiffstats
path: root/archivers
diff options
context:
space:
mode:
authorrakuco <rakuco@FreeBSD.org>2016-11-30 18:50:13 +0800
committerrakuco <rakuco@FreeBSD.org>2016-11-30 18:50:13 +0800
commit94fea8d8008eb4c11866c4d10bd0b9fe72d9817f (patch)
treed9fb479cf1ee4d8fe825d453da256520e74e4d45 /archivers
parente90d172fbf3b85d996b63144fb415d395b962515 (diff)
downloadfreebsd-ports-gnome-94fea8d8008eb4c11866c4d10bd0b9fe72d9817f.tar.gz
freebsd-ports-gnome-94fea8d8008eb4c11866c4d10bd0b9fe72d9817f.tar.zst
freebsd-ports-gnome-94fea8d8008eb4c11866c4d10bd0b9fe72d9817f.zip
Import upstream patch to fix CVE-2016-9296
Null pointer dereference can cause 7z to crash. PR: 214940 Reported by: Sevan Janiyan <venture37@geeklan.co.uk> MFH: 2016Q4 Security: 48e83187-b6e9-11e6-b6cf-5453ed2e2b49 Security: CVE-2016-9296
Diffstat (limited to 'archivers')
-rw-r--r--archivers/p7zip/Makefile2
-rw-r--r--archivers/p7zip/files/patch-CPP_7zip_Archive_7z_7zIn.cpp16
2 files changed, 17 insertions, 1 deletions
diff --git a/archivers/p7zip/Makefile b/archivers/p7zip/Makefile
index 5ee63e0095a0..da5397dc24a7 100644
--- a/archivers/p7zip/Makefile
+++ b/archivers/p7zip/Makefile
@@ -3,7 +3,7 @@
PORTNAME= p7zip
PORTVERSION= 15.14
-PORTREVISION?= 1
+PORTREVISION?= 2
CATEGORIES= archivers
MASTER_SITES= SF
DISTNAME= ${PORTNAME}_${DISTVERSION}_src_all
diff --git a/archivers/p7zip/files/patch-CPP_7zip_Archive_7z_7zIn.cpp b/archivers/p7zip/files/patch-CPP_7zip_Archive_7z_7zIn.cpp
new file mode 100644
index 000000000000..2cf010fa147a
--- /dev/null
+++ b/archivers/p7zip/files/patch-CPP_7zip_Archive_7z_7zIn.cpp
@@ -0,0 +1,16 @@
+Fix for CVE-2016-9296.
+
+Obtained from: https://sourceforge.net/p/p7zip/bugs/185/
+Security: 48e83187-b6e9-11e6-b6cf-5453ed2e2b49
+--- CPP/7zip/Archive/7z/7zIn.cpp.orig 2016-11-30 09:35:06 UTC
++++ CPP/7zip/Archive/7z/7zIn.cpp
+@@ -1091,7 +1091,8 @@ HRESULT CInArchive::ReadAndDecodePackedS
+ 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;
+ }
+