Closed Bug 140982 Opened 22 years ago Closed 15 years ago

some multipart/alternative message doesn't display correctly

Categories

(MailNews Core :: MIME, defect)

PowerPC
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8alpha1

People

(Reporter: bugzilla, Unassigned)

Details

Attachments

(1 file)

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...
Attached file Test case (sanitized)
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
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:
Target Milestone: --- → mozilla1.1beta
QA Contact: gayatri → trix
M. Ducarroz, is this bug still an issue?
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
Assignee: ducarroz → nobody
Status: ASSIGNED → NEW
QA Contact: stephend → mime
Product: Core → MailNews Core
still fails afaict current trunk
Keywords: helpwanted
Whiteboard: [patchlove]
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
Closed: 15 years ago
Keywords: helpwanted
Resolution: --- → FIXED
Whiteboard: [patchlove]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: