diff --git a/deps/unrar/arcread.cpp b/deps/unrar/arcread.cpp index 97d118490..86488cd49 100644 --- a/deps/unrar/arcread.cpp +++ b/deps/unrar/arcread.cpp @@ -254,7 +254,11 @@ size_t Archive::ReadHeader15() hd->SplitAfter=(hd->Flags & LHD_SPLIT_AFTER)!=0; hd->Encrypted=(hd->Flags & LHD_PASSWORD)!=0; hd->SaltSet=(hd->Flags & LHD_SALT)!=0; + + // RAR versions earlier than 2.0 do not set the solid flag + // in file header. They use only a global solid archive flag. hd->Solid=FileBlock && (hd->Flags & LHD_SOLID)!=0; + hd->SubBlock=!FileBlock && (hd->Flags & LHD_SOLID)!=0; hd->Dir=(hd->Flags & LHD_WINDOWMASK)==LHD_DIRECTORY; hd->WinSize=hd->Dir ? 0:0x10000<<((hd->Flags & LHD_WINDOWMASK)>>5); diff --git a/deps/unrar/dll.rc b/deps/unrar/dll.rc index e0083da16..ff610c835 100644 --- a/deps/unrar/dll.rc +++ b/deps/unrar/dll.rc @@ -2,8 +2,8 @@ #include VS_VERSION_INFO VERSIONINFO -FILEVERSION 6, 21, 100, 778 -PRODUCTVERSION 6, 21, 100, 778 +FILEVERSION 6, 22, 1, 865 +PRODUCTVERSION 6, 22, 1, 865 FILEOS VOS__WINDOWS32 FILETYPE VFT_APP { @@ -14,8 +14,8 @@ FILETYPE VFT_APP VALUE "CompanyName", "Alexander Roshal\0" VALUE "ProductName", "RAR decompression library\0" VALUE "FileDescription", "RAR decompression library\0" - VALUE "FileVersion", "6.21.0\0" - VALUE "ProductVersion", "6.21.0\0" + VALUE "FileVersion", "6.22.1\0" + VALUE "ProductVersion", "6.22.1\0" VALUE "LegalCopyright", "Copyright © Alexander Roshal 1993-2023\0" VALUE "OriginalFilename", "Unrar.dll\0" } diff --git a/deps/unrar/extract.cpp b/deps/unrar/extract.cpp index 65b507098..4d9e51202 100644 --- a/deps/unrar/extract.cpp +++ b/deps/unrar/extract.cpp @@ -846,6 +846,7 @@ bool CmdExtract::ExtractCurrentFile(Archive &Arc,size_t HeaderSize,bool &Repeat) Unp->Init(Arc.FileHead.WinSize,Arc.FileHead.Solid); Unp->SetDestSize(Arc.FileHead.UnpSize); #ifndef SFX_MODULE + // RAR 1.3 - 1.5 archives do not set per file solid flag. if (Arc.Format!=RARFMT50 && Arc.FileHead.UnpVer<=15) Unp->DoUnpack(15,FileCount>1 && Arc.Solid); else @@ -1520,6 +1521,15 @@ void CmdExtract::AnalyzeArchive(const wchar *ArcName,bool Volume,bool NewNumberi } if (HeaderType==HEAD_FILE) { + if ((Arc.Format==RARFMT14 || Arc.Format==RARFMT15) && Arc.FileHead.UnpVer<=15) + { + // RAR versions earlier than 2.0 do not set per file solid flag. + // They have only the global archive solid flag, so we can't + // reliably analyze them here. + OpenNext=false; + break; + } + if (!Arc.FileHead.SplitBefore) { if (!MatchFound && !Arc.FileHead.Solid) // Can start extraction from here. diff --git a/deps/unrar/version.hpp b/deps/unrar/version.hpp index fa887fa0e..9af752ed0 100644 --- a/deps/unrar/version.hpp +++ b/deps/unrar/version.hpp @@ -1,6 +1,6 @@ #define RARVER_MAJOR 6 -#define RARVER_MINOR 21 -#define RARVER_BETA 0 -#define RARVER_DAY 16 -#define RARVER_MONTH 2 +#define RARVER_MINOR 22 +#define RARVER_BETA 1 +#define RARVER_DAY 14 +#define RARVER_MONTH 5 #define RARVER_YEAR 2023 diff --git a/docs/changes.txt b/docs/changes.txt index 9dbe1a5f1..b055d96d7 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -72,6 +72,7 @@ - Handle signed/unsigned PDF permission P value for all PDF hash-modes - Fixed minimum password length in module of hash-mode 29800 - Fixed buffer overflow on module_26600.c / module_hash_encode() +- Fixed bug in 23800/unrar with Apple Silicon ## ## Technical @@ -82,6 +83,7 @@ - Apple Driver: Updated requirements to use Apple OpenCL API to macOS 13.0 - use - Backend Checks: Describe workaround in error message when detecting more than 64 backend devices - Brain: Added sanity check and corresponding error message for invalid --brain-port values +- Dependencies: Updated unrar source to 6.2.7 - Dependencies: Updated OpenCL-Headers to v2023.04.17 - Modules: Added support for non-zero IVs for -m 6800 (Lastpass). Also added `tools/lastpass2hashcat.py` - Open Document Format: Added support for small documents with content length < 1024