Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2013-06-22 12:10:58 +0400
committerXhmikosR <xhmikosr@users.sourceforge.net>2013-06-23 17:27:43 +0400
commit812b890e54071ce2489b01782683b3657429fa9e (patch)
treee84a263fc0f19906f5c0c8c45b8cf9a5fe5a8d23 /src/thirdparty/unrar
parent7408b1fa17fd76f8cd05b1b0a2c45624b461011b (diff)
Update Unrar to v5.0.7. and use spaces in Changelog.txt.
Diffstat (limited to 'src/thirdparty/unrar')
-rw-r--r--src/thirdparty/unrar/archive.cpp13
-rw-r--r--src/thirdparty/unrar/archive.hpp1
-rw-r--r--src/thirdparty/unrar/cmddata.cpp6
-rw-r--r--src/thirdparty/unrar/crypt3.cpp3
-rw-r--r--src/thirdparty/unrar/dll.rc8
-rw-r--r--src/thirdparty/unrar/errhnd.cpp4
-rw-r--r--src/thirdparty/unrar/filefn.cpp4
-rw-r--r--src/thirdparty/unrar/filestr.cpp2
-rw-r--r--src/thirdparty/unrar/os.hpp9
-rw-r--r--src/thirdparty/unrar/pathfn.cpp2
-rw-r--r--src/thirdparty/unrar/rar.cpp15
-rw-r--r--src/thirdparty/unrar/resource.cpp2
-rw-r--r--src/thirdparty/unrar/unpack50frag.cpp2
-rw-r--r--src/thirdparty/unrar/version.hpp4
14 files changed, 38 insertions, 37 deletions
diff --git a/src/thirdparty/unrar/archive.cpp b/src/thirdparty/unrar/archive.cpp
index b05eef462..16599e404 100644
--- a/src/thirdparty/unrar/archive.cpp
+++ b/src/thirdparty/unrar/archive.cpp
@@ -52,13 +52,24 @@ Archive::Archive(RAROptions *InitCmd)
}
+Archive::~Archive()
+{
+ if (DummyCmd)
+ delete Cmd;
+}
+
#ifndef SHELL_EXT
void Archive::CheckArc(bool EnableBroken)
{
if (!IsArchive(EnableBroken))
{
- Log(FileName,St(MBadArc),FileName);
+ // If FailedHeaderDecryption is set, we already reported that archive
+ // password is incorrect.
+ if (!FailedHeaderDecryption)
+ {
+ Log(FileName,St(MBadArc),FileName);
+ }
ErrHandler.Exit(RARX_FATAL);
}
}
diff --git a/src/thirdparty/unrar/archive.hpp b/src/thirdparty/unrar/archive.hpp
index 93e034838..95645edc2 100644
--- a/src/thirdparty/unrar/archive.hpp
+++ b/src/thirdparty/unrar/archive.hpp
@@ -60,6 +60,7 @@ class Archive:public File
#endif
public:
Archive(RAROptions *InitCmd=NULL);
+ ~Archive();
RARFORMAT IsSignature(const byte *D,size_t Size);
bool IsArchive(bool EnableBroken);
size_t SearchBlock(HEADER_TYPE HeaderType);
diff --git a/src/thirdparty/unrar/cmddata.cpp b/src/thirdparty/unrar/cmddata.cpp
index b46e55fb2..8d31d0ddc 100644
--- a/src/thirdparty/unrar/cmddata.cpp
+++ b/src/thirdparty/unrar/cmddata.cpp
@@ -392,7 +392,10 @@ void CommandData::ProcessSwitch(const wchar *Switch)
case 'P':
EncryptHeaders=true;
if (Switch[2]!=0)
+ {
Password.Set(Switch+2);
+ cleandata((void *)Switch,wcslen(Switch)*sizeof(Switch[0]));
+ }
else
if (!Password.IsSet())
{
@@ -631,7 +634,10 @@ void CommandData::ProcessSwitch(const wchar *Switch)
eprintf(L"\n");
}
else
+ {
Password.Set(Switch+1);
+ cleandata((void *)Switch,wcslen(Switch)*sizeof(Switch[0]));
+ }
break;
#ifndef SFX_MODULE
case 'Q':
diff --git a/src/thirdparty/unrar/crypt3.cpp b/src/thirdparty/unrar/crypt3.cpp
index 42679b37b..7441e7842 100644
--- a/src/thirdparty/unrar/crypt3.cpp
+++ b/src/thirdparty/unrar/crypt3.cpp
@@ -1,6 +1,5 @@
struct CryptKeyCacheItem
{
-#ifndef _SFX_RTL_
CryptKeyCacheItem()
{
Password.Set(L"");
@@ -12,7 +11,7 @@ struct CryptKeyCacheItem
cleandata(AESInit,sizeof(AESInit));
cleandata(&Password,sizeof(Password));
}
-#endif
+
byte AESKey[16],AESInit[16];
SecPassword Password;
bool SaltPresent;
diff --git a/src/thirdparty/unrar/dll.rc b/src/thirdparty/unrar/dll.rc
index 6d8c62e75..ee671ba3b 100644
--- a/src/thirdparty/unrar/dll.rc
+++ b/src/thirdparty/unrar/dll.rc
@@ -2,8 +2,8 @@
#include <commctrl.h>
VS_VERSION_INFO VERSIONINFO
-FILEVERSION 5, 0, 5, 885
-PRODUCTVERSION 5, 0, 5, 885
+FILEVERSION 5, 0, 6, 901
+PRODUCTVERSION 5, 0, 6, 901
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", "5.0.5\0"
- VALUE "ProductVersion", "5.0.5\0"
+ VALUE "FileVersion", "5.0.6\0"
+ VALUE "ProductVersion", "5.0.6\0"
VALUE "LegalCopyright", "Copyright © Alexander Roshal 1993-2013\0"
VALUE "OriginalFilename", "Unrar.dll\0"
}
diff --git a/src/thirdparty/unrar/errhnd.cpp b/src/thirdparty/unrar/errhnd.cpp
index e1fc9fb1d..cfb672d0a 100644
--- a/src/thirdparty/unrar/errhnd.cpp
+++ b/src/thirdparty/unrar/errhnd.cpp
@@ -265,7 +265,7 @@ void ErrorHandler::SetErrorCode(RAR_EXIT Code)
}
-#if !defined(GUI) && !defined(_SFX_RTL_)
+#ifndef GUI
#ifdef _WIN_ALL
BOOL __stdcall ProcessSignal(DWORD SigType)
#else
@@ -315,7 +315,7 @@ void _stdfunction ProcessSignal(int SigType)
void ErrorHandler::SetSignalHandlers(bool Enable)
{
EnableBreak=Enable;
-#if !defined(GUI) && !defined(_SFX_RTL_)
+#ifndef GUI
#ifdef _WIN_ALL
SetConsoleCtrlHandler(Enable ? ProcessSignal:NULL,TRUE);
// signal(SIGBREAK,Enable ? ProcessSignal:SIG_IGN);
diff --git a/src/thirdparty/unrar/filefn.cpp b/src/thirdparty/unrar/filefn.cpp
index 4dd77f80c..d7809399c 100644
--- a/src/thirdparty/unrar/filefn.cpp
+++ b/src/thirdparty/unrar/filefn.cpp
@@ -156,8 +156,8 @@ int64 GetFreeDisk(const wchar *Name)
GetFilePath(Name,Root,ASIZE(Root));
char RootA[NM];
WideToChar(Root,RootA,ASIZE(RootA));
- struct statfs sfs;
- if (statfs(*RootA!=0 ? RootA:".",&sfs)!=0)
+ struct statvfs sfs;
+ if (statvfs(*RootA!=0 ? RootA:".",&sfs)!=0)
return 0;
int64 FreeSize=sfs.f_bsize;
FreeSize=FreeSize*sfs.f_bavail;
diff --git a/src/thirdparty/unrar/filestr.cpp b/src/thirdparty/unrar/filestr.cpp
index 3d8eaa8d2..d4b844960 100644
--- a/src/thirdparty/unrar/filestr.cpp
+++ b/src/thirdparty/unrar/filestr.cpp
@@ -30,7 +30,7 @@ bool ReadTextFile(
{
if (AbortOnError)
ErrHandler.Exit(RARX_OPEN);
- return(false);
+ return false;
}
}
else
diff --git a/src/thirdparty/unrar/os.hpp b/src/thirdparty/unrar/os.hpp
index 0056946e0..c7ee35248 100644
--- a/src/thirdparty/unrar/os.hpp
+++ b/src/thirdparty/unrar/os.hpp
@@ -129,13 +129,10 @@
#if defined(RAR_SMP) && defined(__APPLE__)
#include <sys/sysctl.h>
#endif
+#ifndef SFX_MODULE
+ #include <sys/statvfs.h>
+#endif
#if defined(__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined(__APPLE__)
- #include <sys/param.h>
- #include <sys/mount.h>
-#else
- #ifndef SFX_MODULE
- #include <sys/statfs.h>
- #endif
#endif
#include <pwd.h>
#include <grp.h>
diff --git a/src/thirdparty/unrar/pathfn.cpp b/src/thirdparty/unrar/pathfn.cpp
index 5f7f5f928..d4396d819 100644
--- a/src/thirdparty/unrar/pathfn.cpp
+++ b/src/thirdparty/unrar/pathfn.cpp
@@ -594,7 +594,7 @@ bool IsFullPath(const wchar *Path)
bool IsDiskLetter(const wchar *Path)
{
wchar Letter=etoupperw(Path[0]);
- return(Letter>='A' && Letter<='Z' && IsDriveDiv(Path[1]));
+ return Letter>='A' && Letter<='Z' && IsDriveDiv(Path[1]);
}
diff --git a/src/thirdparty/unrar/rar.cpp b/src/thirdparty/unrar/rar.cpp
index 4baabd20c..02340e157 100644
--- a/src/thirdparty/unrar/rar.cpp
+++ b/src/thirdparty/unrar/rar.cpp
@@ -38,20 +38,7 @@ int main(int argc, char *argv[])
CommandData *Cmd=new CommandData;
#ifdef SFX_MODULE
wcscpy(Cmd->Command,L"X");
- char *Switch=NULL;
-#ifdef _SFX_RTL_
- char *CmdLine=GetCommandLineA();
- if (CmdLine!=NULL && *CmdLine=='\"')
- CmdLine=strchr(CmdLine+1,'\"');
- if (CmdLine!=NULL && (CmdLine=strpbrk(CmdLine," /"))!=NULL)
- {
- while (IsSpace(*CmdLine))
- CmdLine++;
- Switch=CmdLine;
- }
-#else
- Switch=argc>1 ? argv[1]:NULL;
-#endif
+ char *Switch=argc>1 ? argv[1]:NULL;
if (Switch!=NULL && Cmd->IsSwitch(Switch[0]))
{
int UpperCmd=etoupper(Switch[1]);
diff --git a/src/thirdparty/unrar/resource.cpp b/src/thirdparty/unrar/resource.cpp
index 37e2c7594..7c1af04cf 100644
--- a/src/thirdparty/unrar/resource.cpp
+++ b/src/thirdparty/unrar/resource.cpp
@@ -12,7 +12,7 @@ const wchar *St(MSGID StringId)
wchar *Str=StrTable[StrNum];
*Str=0;
CharToWide(StringId,Str,ASIZE(StrTable[0]));
- return(Str);
+ return Str;
}
#endif
diff --git a/src/thirdparty/unrar/unpack50frag.cpp b/src/thirdparty/unrar/unpack50frag.cpp
index 32c09b6fb..149e182fb 100644
--- a/src/thirdparty/unrar/unpack50frag.cpp
+++ b/src/thirdparty/unrar/unpack50frag.cpp
@@ -24,7 +24,7 @@ void FragmentedWindow::Init(size_t WinSize)
// Minimum still acceptable block size. Next allocations cannot be larger
// than current, so we do not need blocks if they are smaller than
// "size left / attempts left". Also we do not waste time to blocks
- // smaller than some artbitrary constant.
+ // smaller than some arbitrary constant.
size_t MinSize=Max(Size/(ASIZE(Mem)-BlockNum), 0x400000);
byte *NewMem=NULL;
diff --git a/src/thirdparty/unrar/version.hpp b/src/thirdparty/unrar/version.hpp
index e851f286d..d2aa82979 100644
--- a/src/thirdparty/unrar/version.hpp
+++ b/src/thirdparty/unrar/version.hpp
@@ -1,6 +1,6 @@
#define RARVER_MAJOR 5
#define RARVER_MINOR 0
-#define RARVER_BETA 5
-#define RARVER_DAY 3
+#define RARVER_BETA 6
+#define RARVER_DAY 19
#define RARVER_MONTH 6
#define RARVER_YEAR 2013