Bug 7246 - SEGV while sorting EMail with NMH
Summary: SEGV while sorting EMail with NMH
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: nmh
Version: 6.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Florian La Roche
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-11-23 04:35 UTC by Edward Kuns
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-11-23 04:35:34 UTC

Attachments (Terms of Use)

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++;

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).

Note You need to log in before you can comment on or make changes to this bug.