[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#446917: mimedecode: attached rfc822 emails stop the processing of an email



Package: mimedecode
Version: 1.9-4
Severity: important


Please consider this email as input (a stripped-down email with
2 email attachments):

| MIME-Version: 1.0
| Content-Type: multipart/mixed;
| 	boundary="----_=_NextPart_026_01C81003.683F8A00"
| 
| ------_=_NextPart_026_01C81003.683F8A00
| Content-Type: message/rfc822
| Content-Transfer-Encoding: 7bit
| 
| Content-Type: text/plain;
| 	charset="iso-8859-1"
| Content-Transfer-Encoding: quoted-printable
| 
| =20
| 
| ------_=_NextPart_026_01C81003.683F8A00
| Content-Type: message/rfc822
| Content-Transfer-Encoding: 7bit
| 
| Content-Type: text/plain;
| 	charset="iso-8859-1"
| Content-Transfer-Encoding: quoted-printable
| 
| =20
| 
| ------_=_NextPart_026_01C81003.683F8A00

Here is the output I get when passed through mimedecode:

| MIME-Version: 1.0
| Content-Type: multipart/mixed;
| 	boundary="----_=_NextPart_026_01C81003.683F8A00"
| 
| ------_=_NextPart_026_01C81003.683F8A00
| Content-Type: message/rfc822
| Content-Transfer-Encoding: 7bit
| 
| Content-Type: text/plain;
| 	charset="iso-8859-1"
| X-Content-transfer-encoding: fixed from quoted-printable
| Content-Transfer-Encoding: 8bit
| 
|  
| 
| ------_=_NextPart_026_01C81003.683F8A00

As you can see, the second attachment has been discarded!

Here is the output I would expect:

| MIME-Version: 1.0
| Content-Type: multipart/mixed;
| 	boundary="----_=_NextPart_026_01C81003.683F8A00"
| 
| ------_=_NextPart_026_01C81003.683F8A00
| Content-Type: message/rfc822
| Content-Transfer-Encoding: 7bit
| 
| Content-Type: text/plain;
| 	charset="iso-8859-1"
| X-Content-transfer-encoding: fixed from quoted-printable
| Content-Transfer-Encoding: 8bit
| 
|  
| 
| ------_=_NextPart_026_01C81003.683F8A00
| Content-Type: message/rfc822
| Content-Transfer-Encoding: 7bit
| 
| Content-Type: text/plain;
| 	charset="iso-8859-1"
| X-Content-transfer-encoding: fixed from quoted-printable
| Content-Transfer-Encoding: 8bit
| 
|  
| 
| ------_=_NextPart_026_01C81003.683F8A00

This change fixes the problem, but I don't know if it breaks
anything else as I suspect that (char *)0 was there for
something:

--- /home/stephane/tmp/mimedecode.c~	2007-10-16 16:54:05.553595000 +0100
+++ mimedecode.c	2007-10-16 16:54:05.000000000 +0100
@@ -306,7 +306,7 @@ char   *boundary;
 	/* When message is type message we have to handle the body as
 	 * an individual message.
 	 */
-	parse_message((char *)0);
+	parse_message(boundary);
     }
     else
     {


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.23.1
Locale: LANG=en_GB.ISO-8859-15, LC_CTYPE=en_GB.ISO-8859-15 (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash

Versions of packages mimedecode depends on:
ii  libc6                         2.6.1-4    GNU C Library: Shared libraries

mimedecode recommends no packages.

-- no debconf information




Reply to: