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/Rar1Decoder.cpp')
-rwxr-xr-xCPP/7zip/Compress/Rar1Decoder.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/CPP/7zip/Compress/Rar1Decoder.cpp b/CPP/7zip/Compress/Rar1Decoder.cpp
index c7540b92..eadca7b3 100755
--- a/CPP/7zip/Compress/Rar1Decoder.cpp
+++ b/CPP/7zip/Compress/Rar1Decoder.cpp
@@ -42,6 +42,8 @@ UInt32 CDecoder::ReadBits(int numBits) { return m_InBitStream.ReadBits(numBits);
HRESULT CDecoder::CopyBlock(UInt32 distance, UInt32 len)
{
+ if (len == 0)
+ return S_FALSE;
m_UnpackSize -= len;
return m_OutWindowStream.CopyBlock(distance, len) ? S_OK : S_FALSE;
}