"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "CPP/7zip/Archive/VmdkHandler.cpp" between
p7zip_15.14.1_src_all.tar.gz and p7zip_16.02_src_all.tar.gz

About: p7zip is a command-line file archiver with a high compression ratio (a port of the Windows program 7za.exe).

VmdkHandler.cpp  (p7zip_15.14.1_src_all):VmdkHandler.cpp  (p7zip_16.02_src_all)
skipping to change at line 1333 skipping to change at line 1333
RINOK(openCallback->SetCompleted(numVols == 1 ? NULL : &volIndex2, &comple xityStart)); RINOK(openCallback->SetCompleted(numVols == 1 ? NULL : &volIndex2, &comple xityStart));
} }
} }
UInt64 lastSector = 0; UInt64 lastSector = 0;
UInt64 lastVirtCluster = 0; UInt64 lastVirtCluster = 0;
size_t numProcessed_Prev = 0; size_t numProcessed_Prev = 0;
for (size_t i = 0; i < numGdeEntries; i++) for (size_t i = 0; i < numGdeEntries; i++)
{ {
UInt32 v = Get32((const Byte *)table + (size_t)i * 4);
CByteBuffer &buf = Tables.AddNew();
if (v == 0 || v == ZeroSector)
continue;
if (openCallback && (i - numProcessed_Prev) >= 1024)
{
const UInt64 comp = complexityStart + ((UInt64)i << (k_NumMidBits + 2));
const UInt64 volIndex2 = volIndex;
RINOK(openCallback->SetCompleted(numVols == 1 ? NULL : &volIndex2, &comp))
;
numProcessed_Prev = i;
}
const size_t k_NumSectors = (size_t)1 << (k_NumMidBits - 9 + 2); const size_t k_NumSectors = (size_t)1 << (k_NumMidBits - 9 + 2);
const size_t k_NumMidItems = (size_t)1 << k_NumMidBits;
CByteBuffer &buf = Tables.AddNew();
if (h.Is_Marker())
{ {
Byte buf2[1 << 9]; const UInt32 v = Get32((const Byte *)table + (size_t)i * 4);
if (ReadForHeader(stream, v - 1, buf2, 1) != S_OK) if (v == 0 || v == ZeroSector)
return S_FALSE; continue;
if (openCallback && (i - numProcessed_Prev) >= 1024)
{ {
CMarker m; const UInt64 comp = complexityStart + ((UInt64)i << (k_NumMidBits + 2));
m.Parse(buf2); const UInt64 volIndex2 = volIndex;
if (m.Type != k_Marker_GRAIN_TABLE RINOK(openCallback->SetCompleted(numVols == 1 ? NULL : &volIndex2, &comp
));
numProcessed_Prev = i;
}
if (h.Is_Marker())
{
Byte buf2[1 << 9];
if (ReadForHeader(stream, v - 1, buf2, 1) != S_OK)
return S_FALSE;
{
CMarker m;
m.Parse(buf2);
if (m.Type != k_Marker_GRAIN_TABLE
|| m.NumSectors != k_NumSectors || m.NumSectors != k_NumSectors
|| m.SpecSize != 0) || m.SpecSize != 0)
return S_FALSE; return S_FALSE;
}
} }
}
const size_t k_NumMidItems = (size_t)1 << k_NumMidBits;
buf.Alloc(k_NumMidItems * 4); buf.Alloc(k_NumMidItems * 4);
RINOK(ReadForHeader(stream, v, buf, k_NumSectors)); RINOK(ReadForHeader(stream, v, buf, k_NumSectors));
}
for (size_t k = 0; k < k_NumMidItems; k++) for (size_t k = 0; k < k_NumMidItems; k++)
{ {
UInt32 v = Get32((const Byte *)buf + (size_t)k * 4); const UInt32 v = Get32((const Byte *)buf + (size_t)k * 4);
if (v == 0 || v == ZeroSector) if (v == 0 || v == ZeroSector)
continue; continue;
if (v < h.overHead) if (v < h.overHead)
return S_FALSE; return S_FALSE;
if (lastSector < v) if (lastSector < v)
{ {
lastSector = v; lastSector = v;
if (NeedDeflate) if (NeedDeflate)
lastVirtCluster = ((UInt64)i << k_NumMidBits) + k; lastVirtCluster = ((UInt64)i << k_NumMidBits) + k;
} }
 End of changes. 9 change blocks. 
27 lines changed or deleted 29 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS