From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Oct 13 20:50:02 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 179C01065688 for ; Mon, 13 Oct 2008 20:50:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E7E578FC27 for ; Mon, 13 Oct 2008 20:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id m9DKo1GO081862 for ; Mon, 13 Oct 2008 20:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id m9DKo1bB081861; Mon, 13 Oct 2008 20:50:01 GMT (envelope-from gnats) Resent-Date: Mon, 13 Oct 2008 20:50:01 GMT Resent-Message-Id: <200810132050.m9DKo1bB081861@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Guy Brand Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 699171065687 for ; Mon, 13 Oct 2008 20:48:46 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 5828E8FC19 for ; Mon, 13 Oct 2008 20:48:46 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id m9DKmjYE027299 for ; Mon, 13 Oct 2008 20:48:45 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id m9DKmjci027298; Mon, 13 Oct 2008 20:48:45 GMT (envelope-from nobody) Message-Id: <200810132048.m9DKmjci027298@www.freebsd.org> Date: Mon, 13 Oct 2008 20:48:45 GMT From: Guy Brand To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/128075: mutt problem with malformed multipart mail X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Oct 2008 20:50:02 -0000 >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: