This integrates the CVEs applied previously as patches.  Tested on amd64.

Index: Makefile
===================================================================
RCS file: /systems/cvs/ports/archivers/p7zip/Makefile,v
retrieving revision 1.35
diff -u -p -r1.35 Makefile
--- Makefile    30 May 2016 21:22:50 -0000      1.35
+++ Makefile    15 Jul 2016 11:27:34 -0000
@@ -3,11 +3,10 @@
 COMMENT-main=  file archiver with high compression ratio
 COMMENT-rar=   rar modules for p7zip
 
-V=             15.14.1
+V=             16.02
 DISTNAME=      p7zip_${V}_src_all
 PKGNAME=       p7zip-${V}
 PKGNAME-main=  p7zip-${V}
-REVISION-main= 1
 PKGNAME-rar=   p7zip-rar-${V}
 CATEGORIES=    archivers
 
Index: distinfo
===================================================================
RCS file: /systems/cvs/ports/archivers/p7zip/distinfo,v
retrieving revision 1.16
diff -u -p -r1.16 distinfo
--- distinfo    10 Apr 2016 19:53:09 -0000      1.16
+++ distinfo    15 Jul 2016 11:27:41 -0000
@@ -1,2 +1,2 @@
-SHA256 (p7zip_15.14.1_src_all.tar.bz2) = 
aZ202jYhkEET4EBwMiCrsRSN/vR3tVMF4vFKTx+PJdQ=
-SIZE (p7zip_15.14.1_src_all.tar.bz2) = 4147911
+SHA256 (p7zip_16.02_src_all.tar.bz2) = 
XrIKwOKUT2y5wtUd1sRRiUHBhTR9QInqiQh//dbiNB8=
+SIZE (p7zip_16.02_src_all.tar.bz2) = 4239909
Index: patches/patch-CPP_7zip_Archive_HfsHandler_cpp
===================================================================
RCS file: patches/patch-CPP_7zip_Archive_HfsHandler_cpp
diff -N patches/patch-CPP_7zip_Archive_HfsHandler_cpp
--- patches/patch-CPP_7zip_Archive_HfsHandler_cpp       30 May 2016 21:22:50 
-0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-$OpenBSD: patch-CPP_7zip_Archive_HfsHandler_cpp,v 1.1 2016/05/30 21:22:50 
sthen Exp $
-
-CVE-2016-2334
-
---- 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
-       item.GroupID = Get32(r + 0x24);
-       item.AdminFlags = r[0x28];
-       item.OwnerFlags = r[0x29];
-+      */
-       item.FileMode = Get16(r + 0x2A);
-+      /*
-       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;
- 
-     UInt32 size = GetUi32(tableBuf + i * 8 + 4);
-+
-+    if (size > buf.Size() || size > kCompressionBlockSize + 1)
-+        return S_FALSE;
- 
-     RINOK(ReadStream_FALSE(inStream, buf, size));
- 
Index: patches/patch-CPP_7zip_Archive_Udf_UdfIn_cpp
===================================================================
RCS file: patches/patch-CPP_7zip_Archive_Udf_UdfIn_cpp
diff -N patches/patch-CPP_7zip_Archive_Udf_UdfIn_cpp
--- patches/patch-CPP_7zip_Archive_Udf_UdfIn_cpp        30 May 2016 21:22:50 
-0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-$OpenBSD: patch-CPP_7zip_Archive_Udf_UdfIn_cpp,v 1.1 2016/05/30 21:22:50 sthen 
Exp $
-
-CVE-2016-2335
-
---- CPP/7zip/Archive/Udf/UdfIn.cpp.orig        Fri Nov 20 15:40:08 2015
-+++ CPP/7zip/Archive/Udf/UdfIn.cpp     Mon May 23 20:37:46 2016
-@@ -389,7 +389,11 @@ HRESULT CInArchive::ReadFileItem(int volIndex, int fsI
-     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;
Index: patches/patch-CPP_7zip_Bundles_SFXCon_SfxCon_cpp
===================================================================
RCS file: 
/systems/cvs/ports/archivers/p7zip/patches/patch-CPP_7zip_Bundles_SFXCon_SfxCon_cpp,v
retrieving revision 1.2
diff -u -p -r1.2 patch-CPP_7zip_Bundles_SFXCon_SfxCon_cpp
--- patches/patch-CPP_7zip_Bundles_SFXCon_SfxCon_cpp    31 Jan 2016 22:29:37 
-0000      1.2
+++ patches/patch-CPP_7zip_Bundles_SFXCon_SfxCon_cpp    15 Jul 2016 11:50:01 
-0000
@@ -2,8 +2,8 @@ $OpenBSD: patch-CPP_7zip_Bundles_SFXCon_
 
 Pledge self-extracting archives
 
---- CPP/7zip/Bundles/SFXCon/SfxCon.cpp.orig    Sat Sep  5 16:22:56 2015
-+++ CPP/7zip/Bundles/SFXCon/SfxCon.cpp Sun Jan 24 15:59:24 2016
+--- CPP/7zip/Bundles/SFXCon/SfxCon.cpp.orig    Fri May 20 04:38:40 2016
++++ CPP/7zip/Bundles/SFXCon/SfxCon.cpp Fri Jul 15 07:49:33 2016
 @@ -250,6 +250,21 @@ int Main2(
    #endif
  )
@@ -26,23 +26,24 @@ Pledge self-extracting archives
    #if defined(_WIN32) && !defined(UNDER_CE)
    SetFileApisToOEM();
    #endif
-@@ -371,6 +386,19 @@ int Main2(
-     HRESULT result = codecs->Load();
-     if (result != S_OK)
-       throw CSystemException(result);
-+
+@@ -372,6 +387,20 @@ int Main2(
+       HRESULT result = codecs->Load();
+       if (result != S_OK)
+         throw CSystemException(result);
 +#ifdef EXTERNAL_CODECS
 +
 +#ifdef PLEDGE_DEBUG
-+  printf("pledge: 7z SFX\n");
++
++      printf("pledge: 7z SFX\n");
++
 +#endif //PLEDGE_DEBUG
 +
-+  if (pledge("stdio rpath wpath cpath fattr tty", NULL) == -1) {
-+    perror("pledge");
-+    exit(2);
-+  }
++      if (pledge("stdio rpath wpath cpath fattr tty", NULL) == -1) {
++      perror("pledge");
++      exit(2);
++      }
 +
 +#endif
+     }
  
      if (command.CommandType != NCommandType::kList)
-     {
Index: patches/patch-CPP_Windows_System_cpp
===================================================================
RCS file: patches/patch-CPP_Windows_System_cpp
diff -N patches/patch-CPP_Windows_System_cpp
--- patches/patch-CPP_Windows_System_cpp        12 Apr 2016 23:13:22 -0000      
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
-$OpenBSD: patch-CPP_Windows_System_cpp,v 1.1 2016/04/12 23:13:22 sthen Exp $
---- CPP/Windows/System.cpp.orig        Fri Nov 20 16:33:04 2015
-+++ CPP/Windows/System.cpp     Tue Apr 12 18:05:45 2016
-@@ -122,10 +122,13 @@ namespace NWindows
-                               }
-                               fclose( f );
-                       }
--#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || 
defined(__NetBSD__) || defined(__APPLE__)
-+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || 
defined(__NetBSD__) || defined(__APPLE__) || defined(__OpenBSD__)
- #ifdef HW_MEMSIZE
-                       uint64_t val = 0; // support 2Gb+ RAM
-                       int mib[2] = { CTL_HW, HW_MEMSIZE };
-+#elif defined(HW_PHYSMEM64)
-+                      uint64_t val = 0; // support 2Gb+ RAM
-+                      int mib[2] = { CTL_HW, HW_PHYSMEM64 };
- #else // HW_MEMSIZE
-                       unsigned int val = 0; // For old system
-                       int mib[2] = { CTL_HW, HW_PHYSMEM };
Index: pkg/PLIST-main
===================================================================
RCS file: /systems/cvs/ports/archivers/p7zip/pkg/PLIST-main,v
retrieving revision 1.10
diff -u -p -r1.10 PLIST-main
--- pkg/PLIST-main      10 Apr 2016 19:53:09 -0000      1.10
+++ pkg/PLIST-main      15 Jul 2016 11:57:13 -0000
@@ -42,7 +42,6 @@ share/doc/p7zip/DOC/MANUAL/cmdline/switc
 share/doc/p7zip/DOC/MANUAL/cmdline/switches/bb.htm
 share/doc/p7zip/DOC/MANUAL/cmdline/switches/bs.htm
 share/doc/p7zip/DOC/MANUAL/cmdline/switches/charset.htm
-share/doc/p7zip/DOC/MANUAL/cmdline/switches/email.htm
 share/doc/p7zip/DOC/MANUAL/cmdline/switches/exclude.htm
 share/doc/p7zip/DOC/MANUAL/cmdline/switches/include.htm
 share/doc/p7zip/DOC/MANUAL/cmdline/switches/index.htm

Reply via email to