summaryrefslogtreecommitdiffstats
path: root/rfc2045/reformime.c
diff options
context:
space:
mode:
authorSam Varshavchik2016-06-27 06:58:04 -0400
committerSam Varshavchik2016-06-27 06:58:04 -0400
commit2749cda3586d7714b823f3e9519d931187610a63 (patch)
tree82e1e7ea2fa18d39364adee8a97ba8137925945a /rfc2045/reformime.c
parente85983e57296adea94e2eff42cad161649d7ce30 (diff)
downloadcourier-libs-2749cda3586d7714b823f3e9519d931187610a63.tar.bz2
reformime: do not abort due to invalid encoding of the "name" attribute.
Diffstat (limited to 'rfc2045/reformime.c')
-rw-r--r--rfc2045/reformime.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rfc2045/reformime.c b/rfc2045/reformime.c
index 8fb311c..9851c65 100644
--- a/rfc2045/reformime.c
+++ b/rfc2045/reformime.c
@@ -183,7 +183,8 @@ char *disposition_name, *disposition_filename;
rfc2045_mimeinfo(s, &content_type, &transfer_encoding, &charset);
rfc2045_mimepos(s, &start, &end, &body, &nlines, &nbodylines);
- if (rfc2231_udecodeType(s, "name", NULL, &content_name) < 0)
+ if (rfc2231_udecodeType(s, "name", NULL, &content_name) < 0
+ && (content_name=strdup("")) == NULL)
{
perror("malloc");
exit(1);