[issue10694] zipfile.py end of central directory detection not robust

Xuanji Li report at bugs.python.org
Wed Feb 9 15:55:21 CET 2011


Xuanji Li <xuanji at gmail.com> added the comment:

I've attached a patch copying rep's patch from issue 10298, as i think it is cleaner (but it seems to do the same thing as kevin's patch) together with 2 test cases. 

David Murray: I'm not really sure what you mean by "test comments with trailing data"; as I understand, the way to fix the problem is simply to remove the excessively strict check that the length the zip file claims to have is equal to the actual amount of comments found by truncating comments to the claimed size; if that's the case my (new) test should be enough to exercise that logic. Please correct me if I misunderstand.

----------
Added file: http://bugs.python.org/file20723/reps_patch_and_two_tests.diff

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


More information about the Python-bugs-list mailing list