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/Archive/Cpio/CpioIn.cpp')
-rwxr-xr-xCPP/7zip/Archive/Cpio/CpioIn.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/CPP/7zip/Archive/Cpio/CpioIn.cpp b/CPP/7zip/Archive/Cpio/CpioIn.cpp
index 91399362..4732a32e 100755
--- a/CPP/7zip/Archive/Cpio/CpioIn.cpp
+++ b/CPP/7zip/Archive/Cpio/CpioIn.cpp
@@ -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();