[Bug 39] decoding of base64 MIME parts does not work for unusual line lengths

View: New views
1 Messages — Rating Filter:   Alert me  

Parent Message unknown [Bug 39] decoding of base64 MIME parts does not work for unusual line lengths

by Bugzilla from jh.exim-bugzilla@plonk.de :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

------- You are receiving this mail because: -------
You are the QA contact for the bug.

http://bugs.exim.org/show_bug.cgi?id=39

Jakob Hirsch <jh.exim-bugzilla@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|jh.exim@...            |nigel@...
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




--- Comment #12 from Jakob Hirsch <jh.exim-bugzilla@...>  2009-11-07 13:28:14 ---
little change, sorry for being late:

diff --git a/src/mime.c b/src/mime.c
index 9c7ac32..f15ffea 100644
--- a/src/mime.c
+++ b/src/mime.c
@@ -341,7 +341,7 @@ int mime_decode(uschar **listptr) {
   clearerr(mime_stream);
   fseek(mime_stream, f_pos, SEEK_SET);

-  if (size_counter < 0 || fclose(decode_file) != 0)
+  if (fclose(decode_file) != 0 || size_counter < 0)
     return DEFER;

   /* round up to the next KiB */


fclose() should always be done, but the impact is not that big, as
mime_decode() is only done by short-lived processes and we return DEFER, so no
content scanning will be done, but still...


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email

--
## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##