Hello community, here is the log from the commit of package unrar for openSUSE:Factory:NonFree checked in at 2013-10-21 15:15:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2013-09-04 14:05:58.000000000 +0200 +++ /work/SRC/openSUSE:Factory:NonFree/.unrar.new/unrar.changes 2013-10-21 15:15:45.000000000 +0200 @@ -1,0 +2,6 @@ +Mon Oct 21 11:23:34 UTC 2013 - [email protected] + +- Update to 5.0.12 + * No changelog + +------------------------------------------------------------------- Old: ---- unrarsrc-5.0.11.tar.gz New: ---- unrarsrc-5.0.12.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ unrar.spec ++++++ --- /var/tmp/diff_new_pack.ohUiAq/_old 2013-10-21 15:15:46.000000000 +0200 +++ /var/tmp/diff_new_pack.ohUiAq/_new 2013-10-21 15:15:46.000000000 +0200 @@ -18,10 +18,10 @@ # majorversion should match the major version number. %define majorversion 5 -%define libsuffix 5_0_11 +%define libsuffix 5_0_12 Name: unrar -Version: 5.0.11 +Version: 5.0.12 Release: 0 License: SUSE-NonFree Summary: A program to extract, test, and view RAR archives ++++++ unrarsrc-5.0.11.tar.gz -> unrarsrc-5.0.12.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/archive.cpp new/unrar/archive.cpp --- old/unrar/archive.cpp 2013-08-22 15:10:37.000000000 +0200 +++ new/unrar/archive.cpp 2013-09-24 20:08:23.000000000 +0200 @@ -202,8 +202,15 @@ MarkHead.HeadSize=SIZEOF_MARKHEAD3; // Skip the archive encryption header if any and read the main header. - while (ReadHeader()!=0 && GetHeaderType()!=HEAD_MAIN) + while (ReadHeader()!=0) + { + HEADER_TYPE Type=GetHeaderType(); + // In RAR 5.0 we need to quit after reading HEAD_CRYPT if we wish to + // avoid the password prompt. + if (Type==HEAD_MAIN || SilentOpen && Type==HEAD_CRYPT) + break; SeekToNext(); + } // This check allows to make RS based recovery even if password is incorrect. // But we should not do it for EnableBroken or we'll get 'not RAR archive' @@ -248,18 +255,13 @@ MainComment=MainHead.CommentInHeader; -#ifdef USE_QOPEN - if (MainHead.Locator && MainHead.QOpenOffset>0 && Cmd->QOpenMode!=QOPEN_NONE) - { - QOpen.Init(this,false); - QOpen.Load(MainHead.QOpenOffset); - } -#endif - // If we process non-encrypted archive or can request a password, // we set 'first volume' flag based on file attributes below. // It is necessary for RAR 2.x archives, which did not have 'first volume' - // flag in main header. + // flag in main header. Also for all RAR formats we need to scan until + // first file header to set "comment" flag when reading service header. + // Unless we are in silent mode, we need to know about presence of comment + // immediately after IsArchive call. if (!SilentOpen || !Encrypted) { SaveFilePos SavePos(*this); @@ -269,11 +271,7 @@ { HEADER_TYPE HeaderType=GetHeaderType(); if (HeaderType==HEAD_SERVICE) - { - if (SubHead.CmpName(SUBHEAD_TYPE_CMT)) - MainComment=true; FirstVolume=!SubHead.SplitBefore; - } else { FirstVolume=HeaderType==HEAD_FILE && !FileHead.SplitBefore; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/arcread.cpp new/unrar/arcread.cpp --- old/unrar/arcread.cpp 2013-08-22 15:10:37.000000000 +0200 +++ new/unrar/arcread.cpp 2013-09-24 20:08:23.000000000 +0200 @@ -365,6 +365,9 @@ RecoveryPercent++; } } + + if (hd->CmpName(SUBHEAD_TYPE_CMT)) + MainComment=true; } if ((hd->Flags & LHD_SALT)!=0) Raw.GetB(hd->Salt,SIZE_SALT30); @@ -741,6 +744,24 @@ if (ExtraSize!=0) ProcessExtra50(&Raw,(size_t)ExtraSize,&MainHead); + +#ifdef USE_QOPEN + if (MainHead.Locator && MainHead.QOpenOffset>0 && Cmd->QOpenMode!=QOPEN_NONE) + { + // We seek to QO block in the end of archive when processing + // QOpen.Load, so we need to preserve current block positions + // to not break normal archive processing by calling function. + int64 SaveCurBlockPos=CurBlockPos,SaveNextBlockPos=NextBlockPos; + HEADER_TYPE SaveCurHeaderType=CurHeaderType; + + QOpen.Init(this,false); + QOpen.Load(MainHead.QOpenOffset); + + CurBlockPos=SaveCurBlockPos; + NextBlockPos=SaveNextBlockPos; + CurHeaderType=SaveCurHeaderType; + } +#endif } break; case HEAD_FILE: @@ -820,6 +841,9 @@ ConvertFileHeader(hd); } + if (!FileBlock && hd->CmpName(SUBHEAD_TYPE_CMT)) + MainComment=true; + if (BadCRC) { 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 2013-08-22 15:10:37.000000000 +0200 +++ new/unrar/blake2s_sse.cpp 2013-09-24 20:08:23.000000000 +0200 @@ -11,9 +11,6 @@ #define mm_rotr_epi32(r, c) ( \ _mm_xor_si128(_mm_srli_epi32( (r), c ),_mm_slli_epi32( (r), 32-c )) ) #else -// Constants for cyclic rotation. -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 ); #define mm_rotr_epi32(r, c) ( \ c==8 ? _mm_shuffle_epi8(r,crotr8) \ : c==16 ? _mm_shuffle_epi8(r,crotr16) \ @@ -73,12 +70,23 @@ } -// Initialization vector. -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 ); - 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.cpp new/unrar/dll.cpp --- old/unrar/dll.cpp 2013-08-22 15:10:37.000000000 +0200 +++ new/unrar/dll.cpp 2013-09-24 20:08:23.000000000 +0200 @@ -1,5 +1,4 @@ #include "rar.hpp" -#include "dll.hpp" static int RarErrorToDll(RAR_EXIT ErrCode); @@ -340,6 +339,10 @@ Data->Arc.Seek(Data->Arc.CurBlockPos,SEEK_SET); } } + catch (std::bad_alloc) + { + return ERAR_NO_MEMORY; + } catch (RAR_EXIT ErrCode) { return Data->Cmd.DllError!=0 ? Data->Cmd.DllError : RarErrorToDll(ErrCode); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/extract.cpp new/unrar/extract.cpp --- old/unrar/extract.cpp 2013-08-22 15:10:37.000000000 +0200 +++ new/unrar/extract.cpp 2013-09-24 20:08:23.000000000 +0200 @@ -542,11 +542,11 @@ bool FileCreateMode=!TestMode && !SkipSolid && Command!='P'; bool ShowChecksum=true; // Display checksum verification result. + bool LinkSuccess=true; // Assume success for test mode. if (LinkEntry) { FILE_SYSTEM_REDIRECT Type=Arc.FileHead.RedirType; - bool LinkSuccess=true; // Assume success for test mode. if (Type==FSREDIR_HARDLINK || Type==FSREDIR_FILECOPY) { wchar NameExisting[NM]; @@ -653,7 +653,7 @@ #endif if (!TestMode && !WrongPassword && (Command=='X' || Command=='E') && - (!LinkEntry || Arc.FileHead.RedirType==FSREDIR_FILECOPY) && + (!LinkEntry || Arc.FileHead.RedirType==FSREDIR_FILECOPY && LinkSuccess) && (!BrokenFile || Cmd->KeepBroken)) { // We could preallocate more space that really written to broken file. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/strfn.cpp new/unrar/strfn.cpp --- old/unrar/strfn.cpp 2013-08-22 15:10:37.000000000 +0200 +++ new/unrar/strfn.cpp 2013-09-24 20:08:24.000000000 +0200 @@ -47,9 +47,11 @@ // If we specify 'n' exceeding the actual string length, CompareString goes // beyond the trailing zero and compares garbage. So we need to limit 'n' // to real string length. - size_t l1=Min(strlen(s1)+1,n); - size_t l2=Min(strlen(s2)+1,n); - return(CompareStringA(LOCALE_USER_DEFAULT,NORM_IGNORECASE|SORT_STRINGSORT,s1,(int)l1,s2,(int)l2)-2); + // It is important to use strnlen (or memchr(...,0)) instead of strlen, + // because data can be not zero terminated. + size_t l1=Min(strnlen(s1,n),n); + size_t l2=Min(strnlen(s2,n),n); + return CompareStringA(LOCALE_USER_DEFAULT,NORM_IGNORECASE|SORT_STRINGSORT,s1,(int)l1,s2,(int)l2)-2; #else if (n==0) return 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/unpack.cpp new/unrar/unpack.cpp --- old/unrar/unpack.cpp 2013-08-22 15:10:37.000000000 +0200 +++ new/unrar/unpack.cpp 2013-09-24 20:08:24.000000000 +0200 @@ -145,10 +145,18 @@ case 0: // RAR 5.0 compression algorithm 0. #ifdef RAR_SMP if (MaxUserThreads>1) - { - Unpack5MT(Solid); - break; - } + { +// We do not use the multithreaded unpack routine to repack RAR archives +// in 'suspended' mode, because unlike the single threaded code it can +// write more than one dictionary for same loop pass. So we would need +// larger buffers of unknown size. Also we do not support multithreading +// in fragmented window mode. + if (!Fragmented) + { + Unpack5MT(Solid); + break; + } + } #endif Unpack5(Solid); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unrar/win32acl.cpp new/unrar/win32acl.cpp --- old/unrar/win32acl.cpp 2013-08-22 15:10:38.000000000 +0200 +++ new/unrar/win32acl.cpp 2013-09-24 20:08:24.000000000 +0200 @@ -75,7 +75,13 @@ si|=SACL_SECURITY_INFORMATION; SECURITY_DESCRIPTOR *sd=(SECURITY_DESCRIPTOR *)&SubData[0]; - int SetCode=SetFileSecurityW(FileName,si,sd); + int SetCode=SetFileSecurity(FileName,si,sd); + if (!SetCode) + { + wchar LongName[NM]; + if (GetWinLongPath(FileName,LongName,ASIZE(LongName))) + SetCode=SetFileSecurity(LongName,si,sd); + } if (!SetCode) { -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
