summaryrefslogtreecommitdiff
path: root/pith
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2018-01-26 18:08:48 -0700
committerEduardo Chappa <chappa@washington.edu>2018-01-26 18:08:48 -0700
commit2fb79bff5c3ca10c65d0a426d1d4da4e1e3247c6 (patch)
treecba40d45f7e926f92a7381581322299560012c0b /pith
parentf313219416ff6d95f2b66120365516f4367ca8d5 (diff)
downloadalpine-2fb79bff5c3ca10c65d0a426d1d4da4e1e3247c6.tar.xz
* If a calendar entry has an entry that is not encoded in UTF-8,
Alpine fails to parse that specific field, and may assign a value that uses unallocated memory, making Alpine crash when quitting and freeing that memory. Reported by Stefan Mueller.
Diffstat (limited to 'pith')
-rw-r--r--pith/ical.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pith/ical.c b/pith/ical.c
index 64731a96..d2c8e2ba 100644
--- a/pith/ical.c
+++ b/pith/ical.c
@@ -573,6 +573,12 @@ char *ical_get_value(char **line)
*s = '\r';
*line = s+2;
}
+ else{
+ t = NULL;
+ s = strchr(*line, '\r');
+ if(s != NULL)
+ *line = s + 2;
+ }
return t;
}