Hello community,

here is the log from the commit of package unrar for openSUSE:Factory:NonFree 
checked in at 2014-05-09 20:30:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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      2014-05-01 
07:53:22.000000000 +0200
+++ /work/SRC/openSUSE:Factory:NonFree/.unrar.new/unrar.changes 2014-05-09 
20:30:55.000000000 +0200
@@ -1,0 +2,13 @@
+Wed May  7 11:27:15 UTC 2014 - lazy.k...@opensuse.org
+
+- Update to 5.1.5.
+  * Based on rar 5.10 beta 4.
+  * Bugs fixed:
+    + beta 3 failed to decompress multivolume encrypted RAR
+    archives;
+    + under rare conditions x86 version working in multithreaded
+    mode on SSE2 enabled CPU could erroneously issue checksum error
+    message for first file in valid RAR5 archive with BLAKE2sp
+    checksums.
+
+-------------------------------------------------------------------

Old:
----
  unrarsrc-5.1.3.tar.gz

New:
----
  unrarsrc-5.1.5.tar.gz

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

Other differences:
------------------
++++++ unrar.spec ++++++
--- /var/tmp/diff_new_pack.2sLU6p/_old  2014-05-09 20:30:56.000000000 +0200
+++ /var/tmp/diff_new_pack.2sLU6p/_new  2014-05-09 20:30:56.000000000 +0200
@@ -18,10 +18,10 @@
 
 # majorversion should match the major version number.
 %define majorversion 5
-%define libsuffix 5_1_3
+%define libsuffix 5_1_5
 
 Name:           unrar
-Version:        5.1.3
+Version:        5.1.5
 Release:        0
 License:        SUSE-NonFree
 Summary:        A program to extract, test, and view RAR archives

++++++ unrarsrc-5.1.3.tar.gz -> unrarsrc-5.1.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/blake2s.cpp new/unrar/blake2s.cpp
--- old/unrar/blake2s.cpp       2014-04-23 14:12:37.000000000 +0200
+++ new/unrar/blake2s.cpp       2014-05-06 14:13:09.000000000 +0200
@@ -57,6 +57,11 @@
 /* init2 xors IV with input parameter block */
 void blake2s_init_param( blake2s_state *S, uint32 node_offset, uint32 
node_depth)
 {
+#ifdef USE_SSE
+  if (_SSE_Version>=SSE_SSE2)
+    blake2s_init_sse();
+#endif
+
   S->init(); // Clean data.
   for( int i = 0; i < 8; ++i )
     S->h[i] = blake2s_IV[i];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/blake2s_sse.cpp new/unrar/blake2s_sse.cpp
--- old/unrar/blake2s_sse.cpp   2014-04-23 14:12:37.000000000 +0200
+++ new/unrar/blake2s_sse.cpp   2014-05-06 14:13:09.000000000 +0200
@@ -2,6 +2,35 @@
 
 extern const byte blake2s_sigma[10][16];
 
+// Initialization vector.
+static __m128i blake2s_IV_0_3, blake2s_IV_4_7;
+
+#ifdef _WIN_64
+// Constants for cyclic rotation. Used in 64-bit mode in mm_rotr_epi32 macro.
+static __m128i crotr8, crotr16;
+#endif
+
+static void blake2s_init_sse()
+{
+  // We cannot initialize these 128 bit variables in place when declaring
+  // them globally, because global scope initialization is performed before
+  // our SSE check and it would make code incompatible with older non-SSE2
+  // CPUs. Also we cannot initialize them as static inside of function
+  // using these variables, because SSE static initialization is not thread
+  // safe: first thread starts initialization and sets "init done" flag even
+  // if it is not done yet, second thread can attempt to access half-init
+  // SSE data. So we moved init code here.
+
+  blake2s_IV_0_3 = _mm_setr_epi32( 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 
0xA54FF53A );
+  blake2s_IV_4_7 = _mm_setr_epi32( 0x510E527F, 0x9B05688C, 0x1F83D9AB, 
0x5BE0CD19 );
+
+#ifdef _WIN_64
+  crotr8 = _mm_set_epi8( 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1 
);
+  crotr16 = _mm_set_epi8( 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2 
);
+#endif
+}
+
+
 #define LOAD(p)  _mm_load_si128( (__m128i *)(p) )
 #define STORE(p,r) _mm_store_si128((__m128i *)(p), r)
 
@@ -72,21 +101,6 @@
 
 static int blake2s_compress_sse( blake2s_state *S, const byte 
block[BLAKE2S_BLOCKBYTES] )
 {
-  // Initialization vector. Moving them outside of function would provide
-  // ~5% speed gain in 32-bit mode, but would make code incompatible
-  // with older non-SSE2 compatible CPUs. Global static initialization
-  // is performed before our SSE check.
-  static const __m128i blake2s_IV_0_3 = _mm_setr_epi32( 0x6A09E667, 
0xBB67AE85, 0x3C6EF372, 0xA54FF53A );
-  static const __m128i blake2s_IV_4_7 = _mm_setr_epi32( 0x510E527F, 
0x9B05688C, 0x1F83D9AB, 0x5BE0CD19 );
-
-#ifdef _WIN_64
-  // Constants for cyclic rotation. We use them in 64-bit mode
-  // in mm_rotr_epi32 macro above. We must not define in global scope
-  // to be compatible with non-SSE CPU.
-  static const __m128i crotr8 = _mm_set_epi8( 12, 15, 14, 13, 8, 11, 10, 9, 4, 
7, 6, 5, 0, 3, 2, 1 );
-  static const __m128i crotr16 = _mm_set_epi8( 13, 12, 15, 14, 9, 8, 11, 10, 
5, 4, 7, 6, 1, 0, 3, 2 );
-#endif
-
   __m128i row[4];
   __m128i ff0, ff1;
   
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/dll.rc new/unrar/dll.rc
--- old/unrar/dll.rc    2014-04-23 14:05:45.000000000 +0200
+++ new/unrar/dll.rc    2014-05-06 14:06:32.000000000 +0200
@@ -2,8 +2,8 @@
 #include <commctrl.h>
 
 VS_VERSION_INFO VERSIONINFO
-FILEVERSION 5, 10, 3, 1210
-PRODUCTVERSION 5, 10, 3, 1210
+FILEVERSION 5, 10, 4, 1223
+PRODUCTVERSION 5, 10, 4, 1223
 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.10.3\0"
-      VALUE "ProductVersion", "5.10.3\0"
+      VALUE "FileVersion", "5.10.4\0"
+      VALUE "ProductVersion", "5.10.4\0"
       VALUE "LegalCopyright", "Copyright � Alexander Roshal 1993-2014\0"
       VALUE "OriginalFilename", "Unrar.dll\0"
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/rdwrfn.cpp new/unrar/rdwrfn.cpp
--- old/unrar/rdwrfn.cpp        2014-04-23 14:12:38.000000000 +0200
+++ new/unrar/rdwrfn.cpp        2014-05-06 14:13:10.000000000 +0200
@@ -44,8 +44,9 @@
   // block size. We can do it by simple masking, because unpack read code
   // always reads more than CRYPT_BLOCK_SIZE, so we do not risk to make it 0.
   if (Decryption)
-    Count&=~CRYPT_BLOCK_MASK;
+    Count &= ~CRYPT_BLOCK_MASK;
 #endif
+  
   int ReadSize=0,TotalRead=0;
   byte *ReadAddr;
   ReadAddr=Addr;
@@ -62,8 +63,23 @@
     else
     {
       size_t SizeToRead=((int64)Count>UnpPackedSize) ? 
(size_t)UnpPackedSize:Count;
-      if (SizeToRead>0)
+      if (SizeToRead > 0)
       {
+        if (UnpVolume && Decryption && (int64)Count>UnpPackedSize)
+        {
+          // We need aligned blocks for decryption and we want "Keep broken
+          // files" to work efficiently with missing encrypted volumes.
+          // So for last data block in volume we adjust the size to read to
+          // next equal or smaller block producing aligned total block size.
+          // So we'll ask for next volume only when processing few unaligned
+          // bytes left in the end, when most of data is already extracted.
+          size_t NewTotalRead = TotalRead + SizeToRead;
+          size_t Adjust = NewTotalRead - (NewTotalRead  & ~CRYPT_BLOCK_MASK);
+          size_t NewSizeToRead = SizeToRead - Adjust;
+          if ((int)NewSizeToRead > 0)
+            SizeToRead = NewSizeToRead;
+        }
+
         if (!SrcFile->IsOpened())
           return -1;
         ReadSize=SrcFile->Read(ReadAddr,SizeToRead);
@@ -71,9 +87,6 @@
         if (hd->SplitAfter)
           PackedDataHash.Update(ReadAddr,ReadSize);
       }
-      else
-        if (!UnpVolume) // For volume we'll ask for next volume below.
-          return 0;
     }
     CurUnpRead+=ReadSize;
     TotalRead+=ReadSize;
@@ -88,8 +101,12 @@
     // Do not ask for next volume if we read something from current volume.
     // If next volume is missing, we need to process all data from current
     // volume before aborting. It helps to recover all possible data
-    // in "Keep broken files" mode.
-    if (UnpPackedSize == 0 && UnpVolume && ReadSize==0)
+    // in "Keep broken files" mode. But if we process encrypted data,
+    // we ask for next volume also if we have non-aligned encryption block.
+    // Since we adjust data size for decryption earlier above,
+    // it does not hurt "Keep broken files" mode efficiency.
+    if (UnpVolume && UnpPackedSize == 0 && 
+        (ReadSize==0 || Decryption && (TotalRead & CRYPT_BLOCK_MASK) != 0) )
     {
 #ifndef NOVOLUME
       if (!MergeArchive(*SrcArc,this,true,CurrentCommand))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/timefn.cpp new/unrar/timefn.cpp
--- old/unrar/timefn.cpp        2014-04-23 14:12:38.000000000 +0200
+++ new/unrar/timefn.cpp        2014-05-06 14:13:10.000000000 +0200
@@ -50,6 +50,15 @@
   SystemTimeToTzSpecificLocalTime(NULL,&st1,&st2);
   SystemTimeToFileTime(&st2,&lft);
 
+  // Correct precision loss (low 4 decimal digits) in FileTimeToSystemTime.
+  FILETIME rft;
+  SystemTimeToFileTime(&st1,&rft);
+  int64 Corrected=INT32TO64(ft.dwHighDateTime,ft.dwLowDateTime)-
+                  INT32TO64(rft.dwHighDateTime,rft.dwLowDateTime)+
+                  INT32TO64(lft.dwHighDateTime,lft.dwLowDateTime);
+  lft.dwLowDateTime=(DWORD)Corrected;
+  lft.dwHighDateTime=(DWORD)(Corrected>>32);
+
   SYSTEMTIME st;
   FileTimeToSystemTime(&lft,&st);
   lt->Year=st.wYear;
@@ -119,6 +128,15 @@
     FILETIME ft;
     SystemTimeToFileTime(&st1,&ft);
 
+    // Correct precision loss (low 4 decimal digits) in FileTimeToSystemTime.
+    FILETIME rft;
+    SystemTimeToFileTime(&st2,&rft);
+    int64 Corrected=INT32TO64(lft.dwHighDateTime,lft.dwLowDateTime)-
+                    INT32TO64(rft.dwHighDateTime,rft.dwLowDateTime)+
+                    INT32TO64(ft.dwHighDateTime,ft.dwLowDateTime);
+    ft.dwLowDateTime=(DWORD)Corrected;
+    ft.dwHighDateTime=(DWORD)(Corrected>>32);
+
     *this=ft;
   }
   else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/unrar/version.hpp new/unrar/version.hpp
--- old/unrar/version.hpp       2014-04-23 14:12:38.000000000 +0200
+++ new/unrar/version.hpp       2014-05-06 14:13:10.000000000 +0200
@@ -1,6 +1,6 @@
 #define RARVER_MAJOR     5
 #define RARVER_MINOR    10
-#define RARVER_BETA      3
-#define RARVER_DAY      23
-#define RARVER_MONTH     4
+#define RARVER_BETA      4
+#define RARVER_DAY       6
+#define RARVER_MONTH     5
 #define RARVER_YEAR   2014

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to