ports/128075: mail/mutt problem with malformed multipart mail

Schweigert, Udo CERT Udo.Schweigert at siemens.com
Thu Oct 16 09:10:04 UTC 2008


The following reply was made to PR ports/128075; it has been noted by GNATS.

From: "Schweigert, Udo CERT" <Udo.Schweigert at siemens.com>
To: bug-followup at FreeBSD.ORG
Cc: Udo Schweigert <Udo.Schweigert at siemens.com>
Subject: Re: ports/128075: mail/mutt problem with malformed multipart mail
Date: Thu, 16 Oct 2008 11:09:16 +0200

 Please apply the following patch.
 Committer: cvs add files/patch-handler.c 
 
 Message: Fix handling of malformed multipart messages. The patch has been
 taken from mutt's source code repository.
 
 Regards
 
 Udo
 
 diff -ru  /usr/ports/mail/mutt-devel/files/patch-handler.c ./files/patch-handler.c
 --- /usr/ports/mail/mutt-devel/files/patch-handler.c	1970-01-01 01:00:00.000000000 +0100
 +++ ./files/patch-handler.c	2008-10-16 10:59:30.000000000 +0200
 @@ -0,0 +1,32 @@
 +--- handler.c.orig	2008-01-30 05:26:50.000000000 +0100
 ++++ handler.c	2008-10-16 10:56:40.000000000 +0200
 +@@ -1199,11 +1199,12 @@
 +     
 +     if (rc)
 +     {
 ++      mutt_error ("One or more parts of this message could not be displayed");
 +       dprint (1, (debugfile, "Failed on attachment #%d, type %s/%s.\n", count, TYPE(p), NONULL (p->subtype)));
 +     }
 +     
 +-    if (rc || ((s->flags & M_REPLYING)
 +-               && (option (OPTINCLUDEONLYFIRST)) && (s->flags & M_FIRSTDONE)))
 ++    if ((s->flags & M_REPLYING)
 ++        && (option (OPTINCLUDEONLYFIRST)) && (s->flags & M_FIRSTDONE))
 +       break;
 +   }
 + 
 +@@ -1564,6 +1565,14 @@
 + 
 +     if (!handler)
 +       handler = multipart_handler;
 ++    
 ++    if (b->encoding != ENC7BIT && b->encoding != ENC8BIT
 ++        && b->encoding != ENCBINARY)
 ++    {
 ++      dprint (1, (debugfile, "Bad encoding type %d for multipart entity, "
 ++                  "assuming 7 bit\n", b->encoding));
 ++      b->encoding = ENC7BIT;
 ++    }
 +   }
 +   else if (WithCrypto && b->type == TYPEAPPLICATION)
 +   {



More information about the freebsd-ports-bugs mailing list