Subject: Including message/rfc822 content as text

From: Karsten Ballueder <[email-masked]>
Date: Thu, 18 Feb 1999 11:54:18 +0000 (GMT)

Hello,

the fix to set the body->nested to an empty message when
sending message/rfc822 content included as text, didn't
work for me but produced empty messages (though, that's
better than the segfaults it would cause otherwise).

Instead I fixed line 4132 in mail.c which I think is wrong.
It read:
    if (body->subtype && !strcmp (body->subtype,"RFC822")) {
after that line it would attempt to free body->nested.msg, which 
is not guaranteed to be non-NULL, causing the segfault if the MESSAGE/RFC822
is included in text form instead of a parsed structure.
Changing the line to:
    if (body->subtype && !strcmp (body->subtype,"RFC822") && body->nested.msg) {
solved the problem.

--
 Karsten Ballüder http://www.phy.hw.ac.uk/~karsten/ mailto:[email-masked]
 Physics Department, Heriot-Watt University, Edinburgh, EH14 4AS, Scotland
                     Tel. +44-(0)-131-4513068  Fax. +44-(0)-131-4513136
           "In a world without fences, who needs Gates?"

---

From: Mark Crispin <[email-masked]>
Date: Thu, 18 Feb 1999 04:10:05 -0800 (PST)

On Thu, 18 Feb 1999 11:54:18 +0000 (GMT), Karsten Ballueder wrote:
> is not guaranteed to be non-NULL
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This statement is wrong.  If you create an MESSAGE/RFC822 body, you are
responsible for making sure that it is non-NIL.