summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2020-01-25 11:48:08 -0700
committerEduardo Chappa <chappa@washington.edu>2020-01-25 11:48:08 -0700
commita75a6e47a5c181dc3e6c039b2c06103085ef9dff (patch)
tree91b28e03d1960d8613ff8986b466cd45c38bb9ca
parentd75d2841dcf33329544fdc6e697f2402d55226d6 (diff)
downloadalpine-a75a6e47a5c181dc3e6c039b2c06103085ef9dff.tar.xz
* Crash in Alpine when attempting to reply to a multipart/alternative
message that is malformed, and the option to include attachments in reply is enabled. Reported and patched by Peter Tirsek.
-rw-r--r--pith/pine.hlp6
-rw-r--r--pith/reply.c1
2 files changed, 6 insertions, 1 deletions
diff --git a/pith/pine.hlp b/pith/pine.hlp
index 2dda8a13..063e145b 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any
reasonable place to be called from.
Dummy change to get revision in pine.hlp
============= h_revision =================
-Alpine Commit 396 2020-01-25 11:12:17
+Alpine Commit 397 2020-01-25 11:48:03
============= h_news =================
<HTML>
<HEAD>
@@ -183,6 +183,10 @@ any problems you find with this release. New enhancements
of the directory where folders are located. In PC-Alpine this must be
C:\\libressl\\ssl\\certs. The C: drive can be replaced by the name of the drive
where the binary and DLL files are located.
+
+<LI>Crash in Alpine when attempting to reply to a multipart/alternative
+ message that is malformed, and the option to include attachments in
+ reply is enabled. Reported and patched by Peter Tirsek.
</UL>
<P>
diff --git a/pith/reply.c b/pith/reply.c
index 3a75321e..ab4e97c2 100644
--- a/pith/reply.c
+++ b/pith/reply.c
@@ -1169,6 +1169,7 @@ reply_body(MAILSTREAM *stream, ENVELOPE *env, struct mail_bodystruct *orig_body,
else if(orig_body->subtype
&& !strucmp(orig_body->subtype, "alternative")
&& orig_body->nested.part
+ && orig_body->nested.part->next
&& orig_body->nested.part->next->body.type == TYPEMULTIPART
&& orig_body->nested.part->next->body.subtype
&& !strucmp(orig_body->nested.part->next->body.subtype, "MIXED"))