mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-09 22:07:05 -06:00
4.58 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
bd1fa36322
commit
3901bf0ab8
@@ -56,10 +56,7 @@ STDMETHODIMP CHandler::Open(IInStream *stream,
|
||||
RINOK(stream->Seek(0, STREAM_SEEK_CUR, &_streamStartPosition));
|
||||
const int kSignatureSize = 3;
|
||||
Byte buffer[kSignatureSize];
|
||||
UInt32 processedSize;
|
||||
RINOK(ReadStream(stream, buffer, kSignatureSize, &processedSize));
|
||||
if (processedSize != kSignatureSize)
|
||||
return S_FALSE;
|
||||
RINOK(ReadStream_FALSE(stream, buffer, kSignatureSize));
|
||||
if (buffer[0] != 'B' || buffer[1] != 'Z' || buffer[2] != 'h')
|
||||
return S_FALSE;
|
||||
|
||||
@@ -166,9 +163,9 @@ STDMETHODIMP CHandler::Extract(const UInt32* indices, UInt32 numItems,
|
||||
|
||||
const int kSignatureSize = 3;
|
||||
Byte buffer[kSignatureSize];
|
||||
UInt32 processedSize;
|
||||
RINOK(ReadStream(_stream, buffer, kSignatureSize, &processedSize));
|
||||
if (processedSize < kSignatureSize)
|
||||
size_t processedSize = kSignatureSize;
|
||||
RINOK(ReadStream(_stream, buffer, &processedSize));
|
||||
if (processedSize != kSignatureSize)
|
||||
{
|
||||
if (firstItem)
|
||||
return E_FAIL;
|
||||
|
||||
Reference in New Issue
Block a user