diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2008-02-23 19:02:33 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2008-02-23 19:02:33 (GMT) |
commit | 1219a8098965109a112a4732f8f3b78a00a68bae (patch) | |
tree | 4e26094971ab83b30ad1d5c4102aee3b840ddfb3 /Lib/imaplib.py | |
parent | 170482809864d7b5cd8c3e2584074e3e5de808c0 (diff) | |
download | cpython-1219a8098965109a112a4732f8f3b78a00a68bae.zip cpython-1219a8098965109a112a4732f8f3b78a00a68bae.tar.gz cpython-1219a8098965109a112a4732f8f3b78a00a68bae.tar.bz2 |
#1389051: IMAP module tries to read entire message in one chunk. Patch by Fredrik Lundh.
Diffstat (limited to 'Lib/imaplib.py')
-rw-r--r-- | Lib/imaplib.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py index c05abb4..7807e8f 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -1156,7 +1156,7 @@ else: 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) |