summaryrefslogtreecommitdiff
path: root/alpine/mailpart.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2018-12-20 19:10:36 -0700
committerEduardo Chappa <chappa@washington.edu>2018-12-20 19:10:36 -0700
commit08d6d80b7cd3cccb32a81d91c481bbde938f4689 (patch)
tree61698e096c05e3d5c71787cb55310f6b9ccc30fc /alpine/mailpart.c
parent8602b838267f8853a00438a70bf5fdf3ddb24319 (diff)
downloadalpine-08d6d80b7cd3cccb32a81d91c481bbde938f4689.tar.xz
* When a message/rfc822 part of a message is encoded with
Content-Transfer-Encoding: QUOTED-PRINTABLE, Alpine will stop processing that message. Later this causes Alpine to crash because when it displays messages, it assumes that both header and body parts are processed. Reported by Mark Crispin in 2010, in the Alpine-info list (message with subject "crash bug in alpine/mailpart.c:format_msg_att()") with no example, and reported now by Holger Trapp, with an example.
Diffstat (limited to 'alpine/mailpart.c')
-rw-r--r--alpine/mailpart.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/alpine/mailpart.c b/alpine/mailpart.c
index 061ca5e2..74f84adb 100644
--- a/alpine/mailpart.c
+++ b/alpine/mailpart.c
@@ -2724,7 +2724,10 @@ format_msg_att(long int msgno, ATTACH_S **a, HANDLE_S **handlesp, gf_io_t pc, in
gf_puts(NEWLINE, pc);
- ++(*a);
+ if(((*a)+1)->description)
+ ++(*a);
+ else
+ return rv;
#ifdef SMIME
if((*a)->body && (*a)->body->subtype && (strucmp((*a)->body->subtype, OUR_PKCS7_ENCLOSURE_SUBTYPE)==0)){
@@ -2736,7 +2739,10 @@ format_msg_att(long int msgno, ATTACH_S **a, HANDLE_S **handlesp, gf_io_t pc, in
rv = 0;
}
- ++(*a);
+ if(((*a)+1)->description)
+ ++(*a);
+ else
+ return rv;
}
#endif /* SMIME */
@@ -2752,7 +2758,10 @@ format_msg_att(long int msgno, ATTACH_S **a, HANDLE_S **handlesp, gf_io_t pc, in
&& gf_puts(NEWLINE, pc)))
rv = 0;
- ++(*a);
+ if(((*a)+1)->description)
+ ++(*a);
+ else
+ return rv;
}
else if((*a)->body->subtype