MCPcopy Create free account
hub / github.com/MJx0/KittyMemoryEx / findEntryInfoByDataOffset

Function findEntryInfoByDataOffset

KittyMemoryEx/KittyUtils.cpp:644–662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

642 if (!read64(data, fileSize, zip64EOCDOffset + 24, totalEntries64))
643 return false;
644
645 if (!read64(data, fileSize, zip64EOCDOffset + 40, cdSize64))
646 return false;
647
648 if (!read64(data, fileSize, zip64EOCDOffset + 48, cdOffset64))
649 return false;
650
651 if (cdOffset64 > fileSize)
652 return false;
653
654 if (cdSize64 > fileSize - cdOffset64)
655 return false;
656
657 if (totalEntries64 != 0 && cdSize64 / KT_CENTRAL_DIR_HEADER_SIZE < totalEntries64)
658 return false;
659
660 if (info)
661 {
662 info->offset = cdOffset64;
663 info->size = cdSize64;
664 info->entries = totalEntries64;
665 info->zip64 = true;

Callers 3

mmapEntryByDataOffsetFunction · 0.85
ElfScannerMethod · 0.85
infoFromSoInfo_Method · 0.85

Calls 1

listEntriesInZipFunction · 0.85

Tested by

no test coverage detected