Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Oct 2008 20:48:45 GMT
From:      Guy Brand <gb@isis.u-strasbg.fr>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/128075: mutt problem with malformed multipart mail
Message-ID:  <200810132048.m9DKmjci027298@www.freebsd.org>
Resent-Message-ID: <200810132050.m9DKo1bB081861@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         128075
>Category:       ports
>Synopsis:       mutt problem with malformed multipart mail
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 13 20:50:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Guy Brand
>Release:        FreeBSD 8.0-CURRENT
>Organization:
ISIS/CNRS
>Environment:
FreeBSD 8.0-CURRENT #11: Sun Sep 21 09:57:34 CEST 2008 i386

>Description:
mutt-devel has a bug with some malformed multipart message. The symptom is simple: when you have such a mail you just cannot open it and mutt shows a "Impossible to copy" message. I
>How-To-Repeat:
Install mutt-devel from the ports and hit a malformed message...
>Fix:
The defect was reported upstream and fixed in July by Brendan Cully. The fix is available in mutt's mercurial repository (http://dev.mutt.org/hg/mutt) as changeset 5421:f5fe657f0633. To fix the issue in FreeBSD port apply the attached patch to mutt-1.5.18.tar.gz sources.

Patch attached with submission follows:

diff --git a/handler.c b/handler.c
--- handler.c
+++ handler.c
@@ -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)
   {



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810132048.m9DKmjci027298>