Date: Thu, 16 Oct 2008 09:10:03 GMT From: "Schweigert, Udo CERT" <Udo.Schweigert@siemens.com> To: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/128075: mail/mutt problem with malformed multipart mail Message-ID: <200810160910.m9G9A3XM013606@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/128075; it has been noted by GNATS. From: "Schweigert, Udo CERT" <Udo.Schweigert@siemens.com> To: bug-followup@FreeBSD.ORG Cc: Udo Schweigert <Udo.Schweigert@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) + {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810160910.m9G9A3XM013606>