diff options
Diffstat (limited to 'CPP/7zip/Compress/Rar1Decoder.cpp')
-rwxr-xr-x | CPP/7zip/Compress/Rar1Decoder.cpp | 2 |
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; } |