Bug 172388

Summary: mhshow crashes on empty Content-Type
Product: [Fedora] Fedora Reporter: Joel Uckelman <uckelman>
Component: nmhAssignee: Josh Bressers <bressers>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: extras-qa
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-03 19:38:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
show crash output
none
sample crash-causing message
none
Fix for this issue none

Description Joel Uckelman 2005-11-03 17:36:53 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 Firefox/1.0.7

Description of problem:
When a multipart/mixed message has a part with an empty Content-Type, show crashes , apparently due to some memory being double-freed.

Version-Release number of selected component (if applicable):
nmh-1.1-9.fc4

How reproducible:
Always

Steps to Reproduce:
1. Put the example message in a folder.
2. show it.

Actual Results:  show crashes

Expected Results:  show should do something graceful, like assume that the faulty part is text/plain or notify the user that the part is being skipped.

Additional info:

Comment 1 Joel Uckelman 2005-11-03 17:43:07 UTC
Created attachment 120694 [details]
show crash output

Comment 2 Joel Uckelman 2005-11-03 17:44:15 UTC
Created attachment 120695 [details]
sample crash-causing message

Comment 3 Joel Uckelman 2005-11-03 17:50:53 UTC
Incidentally, leaving a Content-Type empty violates RFC 1521. Whatever email
client which is generating these is seriously broken.


Comment 4 Josh Bressers 2005-11-03 19:37:01 UTC
Created attachment 120701 [details]
Fix for this issue

The problem here is that when something goes wrong during mime processing, nmh
will try to close a file stream twice.	This patch removes the spurious
fclose().

Comment 5 Josh Bressers 2005-11-03 19:38:43 UTC
This issue is fixed in nmh-1.1-10.fc3, nmh-1.1-10.fc4 and nmh-1.1-10.fc5.