diff options
| author | Sam Varshavchik | 2016-06-27 06:58:04 -0400 | 
|---|---|---|
| committer | Sam Varshavchik | 2016-06-27 06:58:04 -0400 | 
| commit | 2749cda3586d7714b823f3e9519d931187610a63 (patch) | |
| tree | 82e1e7ea2fa18d39364adee8a97ba8137925945a /rfc2045/reformime.c | |
| parent | e85983e57296adea94e2eff42cad161649d7ce30 (diff) | |
| download | courier-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.c | 3 | 
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); | 
