[Bug] Zip: Compressed size is set to a non-zero value when uncompressed size is set to zero

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug] Zip: Compressed size is set to a non-zero value when uncompressed size is set to zero

Bugzilla from alanhaggai@alanhaggai.org
Hello,

.ZIP archive generation using setuptools seems to generate an invalid
archive. The attached archive was created with setuptools:
python setup.py sdist --format=zip

Analysing the hexdump and Zip-Parser's (https://github.com/alanhaggai/
Zip-Parser) output (attached file: zip_parser.out) it seems that the
archive is corrupt. In its local file header and central directory
file header for Foo-0.2.0/bar/__init__.py, compressed size is set to 2
(the compressed data being 0x03 and 0x00). Uncompressed size is set to
0! This has been confirmed using Ark (KDE archiving tool) and a
snapshot has been attached.

More details can be read at the bug reported against Archive::Zip Perl
module - https://rt.cpan.org/Public/Bug/Display.html?id=68446

When zipfile was used to create the archive (that is, without using
setuptools) this faulty behavior was not noticed.

Please let me know if there is anyway that I can help.

Attachment files:
  - http://alanhaggai.org/files/Foo-0.2.0.zip
  - http://alanhaggai.org/files/ark.png
  - http://alanhaggai.org/files/zip_parser.out

Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig
Reply | Threaded
Open this post in threaded view
|

Re: [Bug] Zip: Compressed size is set to a non-zero value when uncompressed size is set to zero

PJ Eby
On Mon, Oct 17, 2011 at 1:50 PM, Alan Haggai Alavi <[hidden email]> wrote:
When zipfile was used to create the archive (that is, without using
setuptools) this faulty behavior was not noticed.

Does it occur with plain distutils (i.e., no setuptools)?
 

_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig
Reply | Threaded
Open this post in threaded view
|

Re: [Bug] Zip: Compressed size is set to a non-zero value when uncompressed size is set to zero

Bugzilla from alanhaggai@alanhaggai.org
Hello,

On 10/18/11 06:04, PJ Eby wrote:
> Does it occur with plain distutils (i.e., no setuptools)?

Yes, it seems that the behaviour persists.

Regards,
Alan Haggai Alavi.
--
The difference makes the difference.
_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig