From: Guido van Rossum Date: Fri, 7 Aug 1998 15:26:56 +0000 (+0000) Subject: [Sjoerd Mullender] X-Git-Tag: v1.5.2a1~114 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1015be3812fad65e90e1f077d7f34eb88a607bc9;p=python [Sjoerd Mullender] Fixed infinite loop when a message ends prematurely in some circumstances. --- diff --git a/Lib/mimify.py b/Lib/mimify.py index 2ed3d6a042..cb967cd94b 100755 --- a/Lib/mimify.py +++ b/Lib/mimify.py @@ -398,6 +398,14 @@ def mimify_part(ifile, ofile, is_mime): break ofile.write(line) continue + # unexpectedly no multipart separator--copy rest of file + while 1: + line = ifile.readline() + if not line: + return + if must_quote_body: + line = mime_encode(line, 0) + ofile.write(line) def mimify(infile, outfile): '''Convert 8bit parts of a MIME mail message to quoted-printable.'''