]> granicus.if.org Git - python/commitdiff
[Sjoerd Mullender]
authorGuido van Rossum <guido@python.org>
Fri, 7 Aug 1998 15:26:56 +0000 (15:26 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 7 Aug 1998 15:26:56 +0000 (15:26 +0000)
Fixed infinite loop when a message ends prematurely in some
circumstances.

Lib/mimify.py

index 2ed3d6a042d53d0502a6d757c27b26b0b831e7e0..cb967cd94bf70cc4453b35a2bf38be7911b9097e 100755 (executable)
@@ -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.'''