Fix zip64_locator to use ReadUInt32Async instead of ReadUInt16Async

Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-30 11:50:41 +00:00
parent ec31cb9987
commit 6e0e20ba6e

View File

@@ -35,7 +35,7 @@ internal sealed class SeekableZipHeaderFactory : ZipHeaderFactory
// ZIP64_END_OF_CENTRAL_DIRECTORY_LOCATOR should be before the EOCD
stream.Seek(eocd_location - ZIP64_EOCD_LENGTH - 4, SeekOrigin.Begin);
int zip64_locator = await reader.ReadUInt16Async();
uint zip64_locator = await reader.ReadUInt32Async();
if (zip64_locator != ZIP64_END_OF_CENTRAL_DIRECTORY_LOCATOR)
{
throw new ArchiveException("Failed to locate the Zip64 Directory Locator");