summaryrefslogtreecommitdiff
path: root/pith/reply.c
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 /pith/reply.c
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.
Diffstat (limited to 'pith/reply.c')
-rw-r--r--pith/reply.c1
1 files changed, 1 insertions, 0 deletions
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"))