diff options
-rw-r--r-- | pith/ical.c | 5 | ||||
-rw-r--r-- | pith/mailview.c | 11 | ||||
-rw-r--r-- | pith/pine.hlp | 2 |
3 files changed, 13 insertions, 5 deletions
diff --git a/pith/ical.c b/pith/ical.c index 75212514..64731a96 100644 --- a/pith/ical.c +++ b/pith/ical.c @@ -239,7 +239,10 @@ ical_decode(char *text, unsigned short encoding) unsigned long callen; if(encoding == ENCQUOTEDPRINTABLE){ t = rfc822_qprint ((unsigned char *) text,strlen(text),&callen); - strncpy(text, t, strlen(t)); + if(t != NULL){ + strncpy(text, t, strlen(t)); + fs_give((void **) &t); + } } return text; } diff --git a/pith/mailview.c b/pith/mailview.c index 984b560f..1d92bd91 100644 --- a/pith/mailview.c +++ b/pith/mailview.c @@ -515,10 +515,15 @@ format_calendar(long int msgno, BODY *body, HANDLE_S **handlesp, int flgs, int w continue; } break; + + default: caltext = cpystr(rawtext); + } + if(caltext != NULL){ + vcal = ical_parse_text(caltext); + if(vcal != NULL) vcal->encoding = b->encoding; + b->sparep = create_body_sparep(iCalType, (void *) vcal); + fs_give((void **) &caltext); } - vcal = ical_parse_text(caltext); - if(vcal != NULL) vcal->encoding = b->encoding; - b->sparep = create_body_sparep(iCalType, (void *) vcal); } else if(get_body_sparep_type(b->sparep) == iCalType) vcal = (VCALENDAR_S *) get_body_sparep_data(b->sparep); diff --git a/pith/pine.hlp b/pith/pine.hlp index 79cb3c9f..2fa13844 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 244 2017-12-24 19:13:32 +Alpine Commit 245 2017-12-24 21:54:15 ============= h_news ================= <HTML> <HEAD> |