Skip to content

Add more consistency checks in zipfile #139700

@serhiy-storchaka

Description

@serhiy-storchaka

zipfile supports ZIP archives with prepended data (such as SFX executable or zipapp program). Normally, ZIP archive contains offsets from the beginning of the ZIP file, but if it detects that the central directory is located at other position, it corrects locations of all files by the corresponding offset.

There is also "Zip64 end of central directory record" offset for which is written explicitly and can be used to calculate the size of prepended data. Currently its consistency with the central directory offset is not tested.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.10only security fixes3.11only security fixes3.12only security fixes3.13bugs and security fixes3.14bugs and security fixes3.15new features, bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytype-securityA security issue

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions