From 3be2ba48af54614d8e46ed9a26d7d76ecbef4808 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Fri, 21 Dec 2018 19:28:41 -0700 Subject: * When we display a message/rfc822 attachment, print an error message when there was an error fetching the body of that message. --- alpine/mailpart.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/alpine/mailpart.c b/alpine/mailpart.c index 74f84adb..c1c8101b 100644 --- a/alpine/mailpart.c +++ b/alpine/mailpart.c @@ -2726,8 +2726,12 @@ format_msg_att(long int msgno, ATTACH_S **a, HANDLE_S **handlesp, gf_io_t pc, in if(((*a)+1)->description) ++(*a); - else + else{ + if(!(gf_puts("[Can't display missing text segment]", pc) + && gf_puts(NEWLINE, pc))) + rv = 0; return rv; + } #ifdef SMIME if((*a)->body && (*a)->body->subtype && (strucmp((*a)->body->subtype, OUR_PKCS7_ENCLOSURE_SUBTYPE)==0)){ @@ -2741,8 +2745,12 @@ format_msg_att(long int msgno, ATTACH_S **a, HANDLE_S **handlesp, gf_io_t pc, in if(((*a)+1)->description) ++(*a); - else + else{ + if(!(gf_puts("[Can't display missing text segment]", pc) + && gf_puts(NEWLINE, pc))) + rv = 0; return rv; + } } #endif /* SMIME */ @@ -2760,8 +2768,12 @@ format_msg_att(long int msgno, ATTACH_S **a, HANDLE_S **handlesp, gf_io_t pc, in if(((*a)+1)->description) ++(*a); - else + else{ + if(!(gf_puts("[Can't display missing text segment]", pc) + && gf_puts(NEWLINE, pc))) + rv = 0; return rv; + } } else if((*a)->body->subtype -- cgit v1.2.3-54-g00ecf