[New-bugs-announce] [issue9837] ZipFileExt.read() reads more data than requested

Black Dew report at bugs.python.org
Sun Sep 12 11:28:15 CEST 2010

New submission from Black Dew <blackdew at gmail.com>:

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 requested.

This should be fixed by requesting n-len(buf) or something similar, or at least properly documented.

components: Library (Lib)
messages: 116158
nosy: Black.Dew
priority: normal
severity: normal
status: open
title: ZipFileExt.read() reads more data than requested
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list