This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author altendky
Recipients altendky, serhiy.storchaka, xtreak
Date 2018-09-07.20:57:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1536353832.85.0.56676864532.issue34606@psf.upfronthosting.co.za>
In-reply-to
Content
Turns out the docs do document this.  My apologies.

https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT

   4.3.11  Archive extra data record: 

        archive extra data signature    4 bytes  (0x08064b50)
        extra field length              4 bytes
        extra field data                (variable size)

Aside from the discrepancy between 16-bits and 4 bytes, it seems like something should happen, even if it's something other than 'fixing' the code to handle the malformed data.  Isn't it a bug for zipfile to create a non-compliant file?  Shouldn't it either check or provide an interface by which a compliant file could sensibly be created?  It doesn't seem great to just expect users to rewrite this each time they call.

(42).to_bytes(4, 'little') + len(data).to_bytes(4, 'little') + data

or, should it be 'big'?  and would it be (len(data) + 4 + 4)?
History
Date User Action Args
2018-09-07 20:57:12altendkysetrecipients: + altendky, serhiy.storchaka, xtreak
2018-09-07 20:57:12altendkysetmessageid: <1536353832.85.0.56676864532.issue34606@psf.upfronthosting.co.za>
2018-09-07 20:57:12altendkylinkissue34606 messages
2018-09-07 20:57:12altendkycreate