diff options
author | Eduardo Chappa <chappa@washington.edu> | 2017-12-24 21:54:31 -0700 |
---|---|---|
committer | Eduardo Chappa <chappa@washington.edu> | 2017-12-24 21:54:31 -0700 |
commit | 965befd7936f8a788b950d650b76f34f606fc1e1 (patch) | |
tree | 30b67a65af9555c00e586842b1ed4e9c8e5a0579 /pith/ical.c | |
parent | 5cb80f3539fd43b785638b676c7ba242bda2f75d (diff) | |
download | alpine-965befd7936f8a788b950d650b76f34f606fc1e1.tar.xz |
* A few fixes to ical.c and mailview.c to avoid memory leaks, and
add support for encodings other than quoted-printable and base64.
Diffstat (limited to 'pith/ical.c')
-rw-r--r-- | pith/ical.c | 5 |
1 files changed, 4 insertions, 1 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; } |