[issue9837] ZipFileExt.read() reads more data than requested

Black Dew report at bugs.python.org
Sun Sep 12 16:03:35 CEST 2010


Black Dew <blackdew at gmail.com> added the comment:

If i follow the logic in read1() correctly it will do that only for files with very low compression ratios (the original sample where i noticed that problem was actually a chunk of encrypted data inside the zip).

>From the comments referring to "with at most one read() system call" I would also assume it's OS-specific.

Anyway, I've attached a small file that reproduces this behavior on my system (win xp 32bit). When i run it i get "AssertionError: Read returned 4097 bytes (4096 requested)"

----------
Added file: http://bugs.python.org/file18860/a.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9837>
_______________________________________


More information about the Python-bugs-list mailing list