[New-bugs-announce] [issue2143] smtplib.SSLFakeFile hangs forever if "\n" is not encountered
Giampaolo Rodola'
report at bugs.python.org
Tue Feb 19 20:53:04 CET 2008
New submission from Giampaolo Rodola':
By looking through the smtplib module code I think I've found a
potential issue in the SSLFakeFile class code since there's a while loop
which is supposed to be stopped only when the "\n" character is encountered:
def readline(self):
str = ""
chr = None
while chr != "\n":
chr = self.sslobj.read(1)
str += chr
return str
The patch in attachment just adds a break statement to prevent the while
loop to hang forever in case the "\n" character is never encountered.
----------
components: Library (Lib)
files: smptlib.diff
messages: 62569
nosy: facundobatista, giampaolo.rodola, gregory.p.smith
severity: normal
status: open
title: smtplib.SSLFakeFile hangs forever if "\n" is not encountered
type: behavior
versions: Python 2.5, Python 2.6
Added file: http://bugs.python.org/file9465/smptlib.diff
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2143>
__________________________________
More information about the New-bugs-announce
mailing list