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

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'CPP/7zip/Compress/Arj')
-rwxr-xr-xCPP/7zip/Compress/Arj/ArjDecoder1.cpp4
-rwxr-xr-xCPP/7zip/Compress/Arj/ArjDecoder1.h8
-rwxr-xr-xCPP/7zip/Compress/Arj/ArjDecoder2.cpp4
-rwxr-xr-xCPP/7zip/Compress/Arj/ArjDecoder2.h7
4 files changed, 10 insertions, 13 deletions
diff --git a/CPP/7zip/Compress/Arj/ArjDecoder1.cpp b/CPP/7zip/Compress/Arj/ArjDecoder1.cpp
index dda3721a..df859971 100755
--- a/CPP/7zip/Compress/Arj/ArjDecoder1.cpp
+++ b/CPP/7zip/Compress/Arj/ArjDecoder1.cpp
@@ -237,7 +237,7 @@ UInt32 CCoder::decode_p()
}
-STDMETHODIMP CCoder::CodeReal(ISequentialInStream *inStream,
+HRESULT CCoder::CodeReal(ISequentialInStream *inStream,
ISequentialOutStream *outStream, const UInt64 * /* inSize */, const UInt64 *outSize,
ICompressProgressInfo *progress)
{
@@ -297,7 +297,7 @@ STDMETHODIMP CCoder::CodeReal(ISequentialInStream *inStream,
UInt32 len = number - 256 + kMatchMinLen;
UInt32 distance = decode_p();
if (distance >= pos)
- throw "data error";
+ return S_FALSE;
m_OutWindowStream.CopyBlock(distance, len);
pos += len;
}
diff --git a/CPP/7zip/Compress/Arj/ArjDecoder1.h b/CPP/7zip/Compress/Arj/ArjDecoder1.h
index 434a0a41..b337ec72 100755
--- a/CPP/7zip/Compress/Arj/ArjDecoder1.h
+++ b/CPP/7zip/Compress/Arj/ArjDecoder1.h
@@ -86,13 +86,11 @@ class CCoder :
UInt32 decode_c();
UInt32 decode_p();
-public:
-
- MY_UNKNOWN_IMP
-
- STDMETHOD(CodeReal)(ISequentialInStream *inStream,
+ HRESULT CodeReal(ISequentialInStream *inStream,
ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize,
ICompressProgressInfo *progress);
+public:
+ MY_UNKNOWN_IMP
STDMETHOD(Code)(ISequentialInStream *inStream,
ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize,
diff --git a/CPP/7zip/Compress/Arj/ArjDecoder2.cpp b/CPP/7zip/Compress/Arj/ArjDecoder2.cpp
index 24c101d1..a0eca445 100755
--- a/CPP/7zip/Compress/Arj/ArjDecoder2.cpp
+++ b/CPP/7zip/Compress/Arj/ArjDecoder2.cpp
@@ -12,7 +12,7 @@ static const UInt32 kHistorySize = 26624;
// static const UInt32 kMatchMaxLen = 256;
static const UInt32 kMatchMinLen = 3;
-STDMETHODIMP CCoder::CodeReal(ISequentialInStream *inStream,
+HRESULT CCoder::CodeReal(ISequentialInStream *inStream,
ISequentialOutStream *outStream, const UInt64 * /* inSize */, const UInt64 *outSize,
ICompressProgressInfo * /* progress */)
{
@@ -71,7 +71,7 @@ STDMETHODIMP CCoder::CodeReal(ISequentialInStream *inStream,
if (width != 0)
distance += m_InBitStream.ReadBits(width);
if (distance >= pos)
- throw "data error";
+ return S_FALSE;
m_OutWindowStream.CopyBlock(distance, len);
pos += len;
}
diff --git a/CPP/7zip/Compress/Arj/ArjDecoder2.h b/CPP/7zip/Compress/Arj/ArjDecoder2.h
index 7a33f6bd..67a54eba 100755
--- a/CPP/7zip/Compress/Arj/ArjDecoder2.h
+++ b/CPP/7zip/Compress/Arj/ArjDecoder2.h
@@ -47,12 +47,11 @@ class CCoder :
};
friend class CCoderReleaser;
-public:
- MY_UNKNOWN_IMP
-
- STDMETHOD(CodeReal)(ISequentialInStream *inStream,
+ HRESULT CodeReal(ISequentialInStream *inStream,
ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize,
ICompressProgressInfo *progress);
+public:
+ MY_UNKNOWN_IMP
STDMETHOD(Code)(ISequentialInStream *inStream,
ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize,