mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-09 18:07:00 -06:00
4.35 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
0f60a4933b
commit
191cf6781a
@@ -27,9 +27,9 @@ public:
|
||||
bool CopyBlock(UInt32 distance, UInt32 len)
|
||||
{
|
||||
UInt32 pos = _pos - distance - 1;
|
||||
if (pos >= _bufferSize)
|
||||
if (distance >= _pos)
|
||||
{
|
||||
if (!_overDict)
|
||||
if (!_overDict || distance >= _bufferSize)
|
||||
return false;
|
||||
pos += _bufferSize;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ int main2(int n, const char *args[])
|
||||
g_IsNT = IsItWindowsNT();
|
||||
#endif
|
||||
|
||||
fprintf(stderr, "\nLZMA 4.34 Copyright (c) 1999-2006 Igor Pavlov 2006-02-23\n");
|
||||
fprintf(stderr, "\nLZMA 4.35 Copyright (c) 1999-2006 Igor Pavlov 2006-03-03\n");
|
||||
|
||||
if (n == 1)
|
||||
{
|
||||
|
||||
@@ -287,7 +287,10 @@ STDMETHODIMP CDecoder::CodeReal(ISequentialInStream *inStream,
|
||||
}
|
||||
else
|
||||
return S_FALSE;
|
||||
CopyBackBlockOp(distance, length);
|
||||
m_RepDists[m_RepDistPtr++ & 3] = distance;
|
||||
m_LastLength = length;
|
||||
if (!m_OutWindowStream.CopyBlock(distance, length))
|
||||
return S_FALSE;
|
||||
pos += length;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,16 +56,6 @@ class CDecoder :
|
||||
void InitStructures();
|
||||
bool ReadTables();
|
||||
bool ReadLastTables();
|
||||
void CopyBackBlockOp(UInt32 aDistance, UInt32 aLength)
|
||||
{
|
||||
/*
|
||||
if(m_Position <= aDistance)
|
||||
throw CDecoderException(CDecoderException::kData);
|
||||
*/
|
||||
m_RepDists[m_RepDistPtr++ & 3] = aDistance;
|
||||
m_LastLength = aLength;
|
||||
m_OutWindowStream.CopyBlock(aDistance, aLength);
|
||||
}
|
||||
|
||||
public:
|
||||
CDecoder();
|
||||
|
||||
Reference in New Issue
Block a user