some multipart/alternative message doesn't display correctly

RESOLVED FIXED in mozilla1.8alpha1

Status

MailNews Core
MIME
RESOLVED FIXED
16 years ago
9 years ago

People

(Reporter: Jean-Francois Ducarroz, Unassigned)

Tracking

Trunk
mozilla1.8alpha1
PowerPC
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
I received a message generated by a virus which probably contains as well the
virus. This is a multipart/alternative message with one text/html part and two
application/octet-stream part but the text/html doesn't show up on Mac, works
fine on PC. I'll attach a sanitized version of the message...
(Reporter)

Comment 1

16 years ago
Created attachment 81520 [details]
Test case (sanitized)
(Reporter)

Comment 2

16 years ago
the problem comes from the fact the message use 2 part delimiter in a row which
cause mime to generate a bogus part...
Status: NEW → ASSIGNED
(Reporter)

Comment 3

16 years ago
the following patch will fix the problem by return false when we have a bogus
part in the multipart/alternative parser when deciding if a part can be shown.
But I would like to avoid generating a bogus part as well...

Index: mozilla/mailnews/mime/src/mimemalt.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/mime/src/mimemalt.cpp,v
retrieving revision 1.13
diff -w -u -2 -r1.13 mimemalt.cpp
--- mozilla/mailnews/mime/src/mimemalt.cpp	16 Apr 2002 18:41:44 -0000	1.13
+++ mozilla/mailnews/mime/src/mimemalt.cpp	29 Apr 2002 18:20:54 -0000
@@ -220,4 +220,6 @@
 {
   char *ct = MimeHeaders_get (sub_hdrs, HEADER_CONTENT_TYPE, PR_TRUE, PR_FALSE);
+  if (!ct)
+    return PR_FALSE;
 
   /* RFC 1521 says:
(Reporter)

Updated

16 years ago
Target Milestone: --- → mozilla1.1beta

Updated

16 years ago
QA Contact: gayatri → trix
QA Contact: trix → stephend

Comment 4

14 years ago
M. Ducarroz, is this bug still an issue?
(Reporter)

Comment 5

14 years ago
Unless somebody checked in that fix, it should still be an issue. I'll take a
close look at it soon...
Target Milestone: mozilla1.1beta → mozilla1.8alpha
Product: MailNews → Core

Updated

10 years ago
Assignee: ducarroz → nobody
Status: ASSIGNED → NEW
QA Contact: stephend → mime
(Assignee)

Updated

10 years ago
Product: Core → MailNews Core

Comment 6

9 years ago
still fails afaict current trunk
Keywords: helpwanted
Whiteboard: [patchlove]

Comment 7

9 years ago
has a draft patch
(In reply to comment #7)
> has a draft patch

Patch was checked in as part of bug 142672.

http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/mime/src/mimemalt.cpp#226

Marking fixed by bug 142672. Please reopen if otherwise, giving reasons why.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Keywords: helpwanted
Resolution: --- → FIXED
Whiteboard: [patchlove]
You need to log in before you can comment on or make changes to this bug.