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

2010-09-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, thank you. I've fixed the issue and added a test in r84737 (3.x) and r84739 (2.7). -- resolution: -> fixed status: open -> closed ___ Python tracker _

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

2010-09-12 Thread Black Dew
Black Dew 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 r

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

2010-09-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed. In most cases, though, read1(n) will return exactly n bytes and the loop will therefore end immediately with the right buf size. Do you have a simple test case? -- versions: +Python 3.2 ___ Python tracker

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

2010-09-12 Thread R. David Murray
Changes by R. David Murray : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

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

2010-09-12 Thread Black Dew
New submission from Black Dew : ZipFileExt.read() can return more data than requested, unlike file and other file-like objects. This function calls read1() in a loop, passing the original requested size even if part of the data was already read thus reading and returning more than the caller