diff options
author | Guido van Rossum <guido@python.org> | 1998-08-07 15:26:56 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-08-07 15:26:56 (GMT) |
commit | 1015be3812fad65e90e1f077d7f34eb88a607bc9 (patch) | |
tree | f271f20e12d3ab38efd7a96c4f206c6f3070e35c /Lib | |
parent | 5ff1761d3ffb5eeefab46ad3052739a07e902d6f (diff) | |
download | cpython-1015be3812fad65e90e1f077d7f34eb88a607bc9.zip cpython-1015be3812fad65e90e1f077d7f34eb88a607bc9.tar.gz cpython-1015be3812fad65e90e1f077d7f34eb88a607bc9.tar.bz2 |
[Sjoerd Mullender]
Fixed infinite loop when a message ends prematurely in some
circumstances.
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/mimify.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/mimify.py b/Lib/mimify.py index 2ed3d6a..cb967cd 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.''' |