#1389051: IMAP module tries to read entire message in one chunk. Patch by Fredrik Lundh.

This commit is contained in:
Andrew M. Kuchling 2008-02-23 19:06:54 +00:00
parent 31679397af
commit 37d4f7bc0c
2 changed files with 4 additions and 1 deletions

View File

@ -1147,7 +1147,7 @@ class IMAP4_SSL(IMAP4):
chunks = []
read = 0
while read < size:
data = self.sslobj.read(size-read)
data = self.sslobj.read(min(size-read, 16384))
read += len(data)
chunks.append(data)

View File

@ -15,6 +15,9 @@ Core and builtins
Library
-------
- Bug #1389051: imaplib causes excessive memory fragmentation when reading
large messages.
- Bug #1433694: minidom's .normalize() failed to set .nextSibling for
last child element.