Bug 7246

Summary: SEGV while sorting EMail with NMH
Product: [Retired] Red Hat Linux Reporter: Edward Kuns <eddie.kuns>
Component: nmhAssignee: Florian La Roche <laroche>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 6.1   
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: 1999-11-23 04:35:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Edward Kuns 1999-11-23 04:35:34 UTC
I've found and fixed a bug in NMH that will cause a SEGV when sorting a
folder that contains improperly formatted EMail.  Any message that is
missing the blank following ':' on the 'Subject: ' line can cause this
SEGV.  Try it!  Take a folder with a bunch of EMail, pick one message at
random and remove that blank.  (i.e., "Subject:This is the subject") then
sort by subject.

$ sortm +foldername -textfield subject -limit 0

You will get a SEGV.  A patch is below:

[root@kilroy uip]# diff -au sortm.c sortm_new.c
--- sortm.c     Thu Dec  3 17:23:11 1998
+++ sortm_new.c Sun Nov  7 11:55:49 1999
@@ -440,6 +440,7 @@
                        else {
                            if (isalnum(c))
                                *cp2++ = isupper(c) ? tolower(c) : c;
+                           cp++;
                            break;
                        }
                    }


Adding that one line (the "cp++;" line) fixes the bug.  I have notified the
NMH maintainer (Richard Coleman) by EMail, but have not yet heard back.  I
Emailed him on 7 Nov.  I thought I would post a bugfix here so at least
RedHat could get the fix.  This bug is really annoying, as there are people
with this sort of malformatted EMail posting to the redhat lists!

Comment 1 Jeff Johnson 2000-08-16 17:10:42 UTC
Fixed in nmh-1.0.4-5. Thanks for the patch (and patience).