Subject: bin/3028: Seg fault and bus error in /usr/bin/Mail
To: None <gnats-bugs@gnats.netbsd.org>
From: ZaP! <zap@richthofen.tooluser.com>
List: netbsd-bugs
Date: 12/14/1996 11:18:58
>Number:         3028
>Category:       bin
>Synopsis:       Seg fault and bus error in /usr/bin/Mail
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 14 03:20:00 1996
>Last-Modified:
>Originator:     ZaP!
>Organization:
	
>Release:        1.2
>Environment:
	
System: NetBSD richthofen.tooluser.com 1.2 NetBSD 1.2 (RICHTHOFEN) #3: Sat Nov 23 10:46:39 PST 1996 root@richthofen.tooluser.com:/fokker/1.2/src/usr/src/sys/arch/i386/compile/RICHTHOFEN i386


>Description:
        When attempting a reply with "r" using /usr/bin/Mail, a 
        segmentation fault occurs when there are more than 86 unique
        line in the header.  If there are 85 unique lines, a bus error
        occurs.  No error occurs with fewer lines.

>How-To-Repeat:
	Create a mail message with >86 unique header lines.  eg,
        include all header lines needed for valid mail and then 
        add a bunch of To: lines.  The message that tipped this off
        seemed to be sent from MS-exchange, which likes to send things
        in this form:
        To: FooBar <foo@bar.com>,
                "'Diz Guy's'"
                <disguise@camoflage.gov>,
        To: ... etc
        All of these lines seem to conform to RFC 822;  800 identical 
        To: lines do *not* cause the error, because the mailer
        collapses them when a reply is attempted.

>Fix:
        Since I'm just now pulling down that part of the source tree,
        you'll prolly fix it before I do, but if I do come up with a 
        fix, I'll send it along...  (Yeah, ok, sure, people should
        use real mailing list exploders instead of Really Long Headers
        but who wants to admit that Exchange broke a unix mailer?  ;)

>Audit-Trail:
>Unformatted: