aboutsummaryrefslogtreecommitdiff
path: root/archivers/p7zip/files/patch-CPP_7zip_Archive_HfsHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'archivers/p7zip/files/patch-CPP_7zip_Archive_HfsHandler.cpp')
-rw-r--r--archivers/p7zip/files/patch-CPP_7zip_Archive_HfsHandler.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/archivers/p7zip/files/patch-CPP_7zip_Archive_HfsHandler.cpp b/archivers/p7zip/files/patch-CPP_7zip_Archive_HfsHandler.cpp
index 2ff5cd79e848..e01719cb0514 100644
--- a/archivers/p7zip/files/patch-CPP_7zip_Archive_HfsHandler.cpp
+++ b/archivers/p7zip/files/patch-CPP_7zip_Archive_HfsHandler.cpp
@@ -1,9 +1,9 @@
Patch for CVE-2016-2334.
Obtained from: https://sourceforge.net/p/p7zip/discussion/383043/thread/9d0fb86b/
---- CPP/7zip/Archive/HfsHandler.cpp.orig Fri Jun 19 06:52:08 2015
-+++ CPP/7zip/Archive/HfsHandler.cpp Mon May 23 20:37:42 2016
-@@ -987,7 +987,9 @@ HRESULT CDatabase::LoadCatalog(const CFork &fork, cons
+--- CPP/7zip/Archive/HfsHandler.cpp.orig 2015-06-19 10:52:08 UTC
++++ CPP/7zip/Archive/HfsHandler.cpp
+@@ -987,7 +987,9 @@ HRESULT CDatabase::LoadCatalog(const CFo
item.GroupID = Get32(r + 0x24);
item.AdminFlags = r[0x28];
item.OwnerFlags = r[0x29];
@@ -13,13 +13,13 @@ Obtained from: https://sourceforge.net/p/p7zip/discussion/383043/thread/9d0fb86b
item.special.iNodeNum = Get16(r + 0x2C); // or .linkCount
item.FileType = Get32(r + 0x30);
item.FileCreator = Get32(r + 0x34);
-@@ -1571,6 +1573,9 @@ HRESULT CHandler::ExtractZlibFile(
- blockSize = (UInt32)rem;
+@@ -1572,6 +1574,9 @@ HRESULT CHandler::ExtractZlibFile(
UInt32 size = GetUi32(tableBuf + i * 8 + 4);
-+
+
+ if (size > buf.Size() || size > kCompressionBlockSize + 1)
+ return S_FALSE;
-
++
RINOK(ReadStream_FALSE(inStream, buf, size));
+ if ((buf[0] & 0xF) == 0xF)