mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 06:06:59 -06:00
4.58 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
bd1fa36322
commit
3901bf0ab8
@@ -16,7 +16,9 @@ namespace NCpio {
|
||||
|
||||
HRESULT CInArchive::ReadBytes(void *data, UInt32 size, UInt32 &processedSize)
|
||||
{
|
||||
RINOK(ReadStream(m_Stream, data, size, &processedSize));
|
||||
size_t realProcessedSize = size;
|
||||
RINOK(ReadStream(m_Stream, data, &realProcessedSize));
|
||||
processedSize = (UInt32)realProcessedSize;
|
||||
m_Position += processedSize;
|
||||
return S_OK;
|
||||
}
|
||||
@@ -240,8 +242,7 @@ HRESULT CInArchive::GetNextItem(bool &filled, CItemEx &item)
|
||||
}
|
||||
if (nameSize == 0 || nameSize >= (1 << 27))
|
||||
return E_FAIL;
|
||||
RINOK(ReadBytes(item.Name.GetBuffer(nameSize),
|
||||
nameSize, processedSize));
|
||||
RINOK(ReadBytes(item.Name.GetBuffer(nameSize), nameSize, processedSize));
|
||||
if (processedSize != nameSize)
|
||||
return E_FAIL;
|
||||
item.Name.ReleaseBuffer();
|
||||
|
||||
Reference in New Issue
Block a user