Hello community,

here is the log from the commit of package unrar for openSUSE:Factory:NonFree 
checked in at 2015-10-28 17:31:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory:NonFree/unrar (Old)
 and      /work/SRC/openSUSE:Factory:NonFree/.unrar.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "unrar"

Changes:
--------
--- /work/SRC/openSUSE:Factory:NonFree/unrar/unrar.changes      2015-10-14 
16:46:21.000000000 +0200
+++ /work/SRC/openSUSE:Factory:NonFree/.unrar.new/unrar.changes 2015-10-28 
17:31:28.000000000 +0100
@@ -1,0 +2,7 @@
+Wed Oct 28 06:15:49 UTC 2015 - [email protected]
+
+- Update to 5.3.7
+  * Changes in broken archive processing to handle invalid ZIP,
+    ARJ and ISO archives more reliably
+
+-------------------------------------------------------------------

Old:
----
  unrarsrc-5.3.5.tar.gz

New:
----
  unrarsrc-5.3.7.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ unrar.spec ++++++
--- /var/tmp/diff_new_pack.wp9RyV/_old  2015-10-28 17:31:28.000000000 +0100
+++ /var/tmp/diff_new_pack.wp9RyV/_new  2015-10-28 17:31:28.000000000 +0100
@@ -18,10 +18,10 @@
 
 # majorversion should match the major version number.
 %define majorversion 5
-%define libsuffix 5_3_5
+%define libsuffix 5_3_7
 
 Name:           unrar
-Version:        5.3.5
+Version:        5.3.7
 Release:        0
 Summary:        A program to extract, test, and view RAR archives
 License:        SUSE-NonFree

++++++ unrarsrc-5.3.5.tar.gz -> unrarsrc-5.3.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/UnRARDll.vcproj new/unrar/UnRARDll.vcproj
--- old/unrar/UnRARDll.vcproj   2014-03-16 19:51:42.000000000 +0100
+++ new/unrar/UnRARDll.vcproj   2015-10-04 10:38:40.000000000 +0200
@@ -73,7 +73,7 @@
                                OutputFile="$(OutDir)\unrar.dll"
                                LinkIncremental="2"
                                GenerateManifest="true"
-                               
ModuleDefinitionFile="D:\Projects\WinRAR\rar\dll.def"
+                               ModuleDefinitionFile="dll.def"
                                GenerateDebugInformation="true"
                                SubSystem="1"
                                TargetMachine="1"
@@ -155,7 +155,7 @@
                                OutputFile="$(OutDir)\unrar64.dll"
                                LinkIncremental="2"
                                GenerateManifest="true"
-                               
ModuleDefinitionFile="D:\Projects\WinRAR\rar\dll.def"
+                               ModuleDefinitionFile="dll.def"
                                GenerateDebugInformation="true"
                                SubSystem="1"
                                TargetMachine="17"
@@ -245,7 +245,7 @@
                                OutputFile="$(OutDir)\unrar.dll"
                                LinkIncremental="1"
                                GenerateManifest="true"
-                               
ModuleDefinitionFile="D:\Projects\WinRAR\rar\dll.def"
+                               ModuleDefinitionFile="dll.def"
                                GenerateDebugInformation="true"
                                SubSystem="1"
                                OptimizeReferences="2"
@@ -337,7 +337,7 @@
                                OutputFile="$(OutDir)\unrar64.dll"
                                LinkIncremental="1"
                                GenerateManifest="true"
-                               
ModuleDefinitionFile="D:\Projects\WinRAR\rar\dll.def"
+                               ModuleDefinitionFile="dll.def"
                                GenerateDebugInformation="true"
                                SubSystem="1"
                                OptimizeReferences="2"
@@ -430,7 +430,7 @@
                                OutputFile="$(OutDir)\unrar_nocrypt.dll"
                                LinkIncremental="1"
                                GenerateManifest="true"
-                               
ModuleDefinitionFile="D:\Projects\WinRAR\rar\dll_nocrypt.def"
+                               ModuleDefinitionFile="dll_nocrypt.def"
                                GenerateDebugInformation="true"
                                SubSystem="1"
                                OptimizeReferences="2"
@@ -522,7 +522,7 @@
                                OutputFile="$(OutDir)\unrar64_nocrypt.dll"
                                LinkIncremental="1"
                                GenerateManifest="true"
-                               
ModuleDefinitionFile="D:\Projects\WinRAR\rar\dll_nocrypt.def"
+                               ModuleDefinitionFile="dll_nocrypt.def"
                                GenerateDebugInformation="true"
                                SubSystem="1"
                                OptimizeReferences="2"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/archive.cpp new/unrar/archive.cpp
--- old/unrar/archive.cpp       2015-10-02 00:34:56.000000000 +0200
+++ new/unrar/archive.cpp       2015-10-27 10:16:03.000000000 +0100
@@ -109,9 +109,9 @@
 #endif
       if (Size>=7 && D[1]==0x61 && D[2]==0x72 && D[3]==0x21 && D[4]==0x1a && 
D[5]==0x07)
       {
-        // We check for non-zero last signature byte, so we can return
-        // a sensible warning in case we'll want to change the archive
-        // format sometimes in the future.
+        // We check the last signature byte, so we can return a sensible
+        // warning in case we'll want to change the archive format
+        // sometimes in the future.
         if (D[6]==0)
           Type=RARFMT15;
         else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/arcread.cpp new/unrar/arcread.cpp
--- old/unrar/arcread.cpp       2015-10-02 00:34:56.000000000 +0200
+++ new/unrar/arcread.cpp       2015-10-27 10:16:03.000000000 +0100
@@ -784,7 +784,12 @@
 
         uint CompInfo=(uint)Raw.GetV();
         hd->Method=(CompInfo>>7) & 7;
-        hd->UnpVer=CompInfo & 0x3f;
+
+        // "+ 50" to not mix with old RAR format algorithms. For example,
+        // we may need to use the compression algorithm 15 in the future,
+        // but it was already used in RAR 1.5 and Unpack needs to distinguish
+        // them.
+        hd->UnpVer=(CompInfo & 0x3f) + 50;
 
         hd->HostOS=(byte)Raw.GetV();
         size_t NameSize=(size_t)Raw.GetV();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/dll.rc new/unrar/dll.rc
--- old/unrar/dll.rc    2015-10-01 23:48:14.000000000 +0200
+++ new/unrar/dll.rc    2015-10-27 10:12:11.000000000 +0100
@@ -2,8 +2,8 @@
 #include <commctrl.h>
 
 VS_VERSION_INFO VERSIONINFO
-FILEVERSION 5, 30, 4, 1738
-PRODUCTVERSION 5, 30, 4, 1738
+FILEVERSION 5, 30, 6, 1763
+PRODUCTVERSION 5, 30, 6, 1763
 FILEOS VOS__WINDOWS32
 FILETYPE VFT_APP
 {
@@ -14,8 +14,8 @@
       VALUE "CompanyName", "Alexander Roshal\0"
       VALUE "ProductName", "RAR decompression library\0"
       VALUE "FileDescription", "RAR decompression library\0"
-      VALUE "FileVersion", "5.30.4\0"
-      VALUE "ProductVersion", "5.30.4\0"
+      VALUE "FileVersion", "5.30.6\0"
+      VALUE "ProductVersion", "5.30.6\0"
       VALUE "LegalCopyright", "Copyright � Alexander Roshal 1993-2015\0"
       VALUE "OriginalFilename", "Unrar.dll\0"
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/extract.cpp new/unrar/extract.cpp
--- old/unrar/extract.cpp       2015-10-02 00:34:56.000000000 +0200
+++ new/unrar/extract.cpp       2015-10-27 10:16:03.000000000 +0100
@@ -434,11 +434,12 @@
 
     if (!CheckUnpVer(Arc,ArcFileName))
     {
-      ExtrFile=false;
       ErrHandler.SetErrorCode(RARX_FATAL);
 #ifdef RARDLL
       Cmd->DllError=ERAR_UNKNOWN_FORMAT;
 #endif
+      Arc.SeekToNext();
+      return !Arc.Solid; // Can try extracting next file only in non-solid 
archive.
     }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/filcreat.cpp new/unrar/filcreat.cpp
--- old/unrar/filcreat.cpp      2015-10-02 00:34:56.000000000 +0200
+++ new/unrar/filcreat.cpp      2015-10-27 10:16:03.000000000 +0100
@@ -42,9 +42,13 @@
     if (Choice==UIASKREP_R_CANCEL)
       ErrHandler.Exit(RARX_USERBREAK);
   }
+
+  // Try to truncate the existing file first instead of delete,
+  // so we preserve existing file permissions such as NTFS permissions.
   uint FileMode=WriteOnly ? FMF_WRITE|FMF_SHAREREAD:FMF_UPDATE|FMF_SHAREREAD;
   if (NewFile!=NULL && NewFile->Create(Name,FileMode))
     return true;
+
   CreatePath(Name,true);
   return NewFile!=NULL ? NewFile->Create(Name,FileMode):DelFile(Name);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/headers.hpp new/unrar/headers.hpp
--- old/unrar/headers.hpp       2015-10-02 00:34:56.000000000 +0200
+++ new/unrar/headers.hpp       2015-10-27 10:16:03.000000000 +0100
@@ -20,9 +20,9 @@
 #define  SIZEOF_STREAMHEAD      26
 
 #define  VER_PACK               29
-#define  VER_PACK5               0
+#define  VER_PACK5              50 // It is stored as 0, but we subtract 50 
when saving an archive.
 #define  VER_UNPACK             29
-#define  VER_UNPACK5             0
+#define  VER_UNPACK5            50 // It is stored as 0, but we add 50 when 
reading an archive.
 
 #define  MHD_VOLUME         0x0001U
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/isnt.hpp new/unrar/isnt.hpp
--- old/unrar/isnt.hpp  2015-10-02 00:34:56.000000000 +0200
+++ new/unrar/isnt.hpp  2015-10-27 10:16:03.000000000 +0100
@@ -3,7 +3,8 @@
 
 enum WINNT_VERSION {
   WNT_NONE=0,WNT_NT351=0x0333,WNT_NT4=0x0400,WNT_W2000=0x0500,
-  WNT_WXP=0x0501,WNT_W2003=0x0502,WNT_VISTA=0x0600,WNT_W7=0x0601
+  WNT_WXP=0x0501,WNT_W2003=0x0502,WNT_VISTA=0x0600,WNT_W7=0x0601,
+  WNT_W8=0x0602,WNT_W81=0x0603,WNT_W10=0x0a00
 };
 
 DWORD WinNT();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/list.cpp new/unrar/list.cpp
--- old/unrar/list.cpp  2015-10-02 00:34:56.000000000 +0200
+++ new/unrar/list.cpp  2015-10-27 10:16:03.000000000 +0100
@@ -405,7 +405,7 @@
       else
         mprintf(L"????????  ");
   }
-  mprintf(L"%-12ls",Name);
+  mprintf(L"%ls",Name);
 }
 
 /*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/timefn.cpp new/unrar/timefn.cpp
--- old/unrar/timefn.cpp        2015-10-02 00:34:56.000000000 +0200
+++ new/unrar/timefn.cpp        2015-10-27 10:16:03.000000000 +0100
@@ -140,7 +140,7 @@
     {
       // Reverse procedure which we do in GetLocal.
       SYSTEMTIME st1,st2;
-      FileTimeToSystemTime(&lft,&st2);
+      FileTimeToSystemTime(&lft,&st2); // st2 might be unequal to st, because 
we added lt->Reminder to lft.
       TzSpecificLocalTimeToSystemTime(NULL,&st2,&st1);
       SystemTimeToFileTime(&st1,&ft);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/unpack.cpp new/unrar/unpack.cpp
--- old/unrar/unpack.cpp        2015-10-02 00:34:56.000000000 +0200
+++ new/unrar/unpack.cpp        2015-10-27 10:16:03.000000000 +0100
@@ -137,21 +137,27 @@
 
 void Unpack::DoUnpack(int Method,bool Solid)
 {
+  // Methods <50 will crash in Fragmented mode when accessing NULL Window.
+  // They cannot be called in such mode now, but we check it below anyway
+  // just for extra safety.
   switch(Method)
   {
 #ifndef SFX_MODULE
     case 15: // rar 1.5 compression
-      Unpack15(Solid);
+      if (!Fragmented)
+        Unpack15(Solid);
       break;
     case 20: // rar 2.x compression
     case 26: // files larger than 2GB
-      Unpack20(Solid);
+      if (!Fragmented)
+        Unpack20(Solid);
       break;
 #endif
     case 29: // rar 3.x compression
-      Unpack29(Solid);
+      if (!Fragmented)
+        Unpack29(Solid);
       break;
-    case 0: // RAR 5.0 compression algorithm 0.
+    case 50: // RAR 5.0 compression algorithm.
 #ifdef RAR_SMP
       if (MaxUserThreads>1)
       {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/unpack15.cpp new/unrar/unpack15.cpp
--- old/unrar/unpack15.cpp      2015-10-02 00:34:56.000000000 +0200
+++ new/unrar/unpack15.cpp      2015-10-27 10:16:03.000000000 +0100
@@ -401,6 +401,14 @@
   unsigned int Flags,NewFlagsPlace;
   unsigned int FlagsPlace=DecodeNum(Inp.fgetbits(),STARTHF2,DecHf2,PosHf2);
 
+  // Our Huffman table stores 257 items and needs all them in other parts
+  // of code such as when StMode is on, so the first item is control item.
+  // While normally we do not use the last item to code the flags byte here,
+  // we need to check for value 256 when unpacking in case we unpack
+  // a corrupt archive.
+  if (FlagsPlace>=sizeof(ChSetC)/sizeof(ChSetC[0]))
+    return;
+
   while (1)
   {
     Flags=ChSetC[FlagsPlace];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/unpack30.cpp new/unrar/unpack30.cpp
--- old/unrar/unpack30.cpp      2015-10-02 00:34:56.000000000 +0200
+++ new/unrar/unpack30.cpp      2015-10-27 10:16:03.000000000 +0100
@@ -627,6 +627,7 @@
         while (I+1<PrgStack.Size())
         {
           UnpackFilter30 *NextFilter=PrgStack[I+1];
+          // It is required to check NextWindow here.
           if (NextFilter==NULL || NextFilter->BlockStart!=BlockStart ||
               NextFilter->BlockLength!=FilteredDataSize || 
NextFilter->NextWindow)
             break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/version.hpp new/unrar/version.hpp
--- old/unrar/version.hpp       2015-10-02 00:34:56.000000000 +0200
+++ new/unrar/version.hpp       2015-10-27 10:16:03.000000000 +0100
@@ -1,6 +1,6 @@
 #define RARVER_MAJOR     5
 #define RARVER_MINOR    30
-#define RARVER_BETA      4
-#define RARVER_DAY       2
+#define RARVER_BETA      6
+#define RARVER_DAY      27
 #define RARVER_MONTH    10
 #define RARVER_YEAR   2015
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/volume.cpp new/unrar/volume.cpp
--- old/unrar/volume.cpp        2015-10-02 00:34:56.000000000 +0200
+++ new/unrar/volume.cpp        2015-10-27 10:16:03.000000000 +0100
@@ -247,7 +247,8 @@
   // We quit only on 'abort' condition, but not on 'name not changed'.
   // It is legitimate for program to return the same name when waiting
   // for currently non-existent volume.
-  if (DllVolAborted)
+  // Also we quit to prevent an infinite loop if no callback is defined.
+  if (DllVolAborted || Cmd->Callback==NULL && Cmd->ChangeVolProc==NULL)
   {
     Cmd->DllError=ERAR_EOPEN;
     return false;


Reply via email to