diff options
| author | Sam Varshavchik | 2017-12-26 07:44:38 -0500 | 
|---|---|---|
| committer | Sam Varshavchik | 2017-12-26 07:44:38 -0500 | 
| commit | 60586311ac65a7e1f6acb5869f5d9174d597d8c7 (patch) | |
| tree | 270614d3b994c07c103a2a315a2f64b099f5189e /rfc2045/reformime.c | |
| parent | a8d82c4d83467ac95990f229f031606464c5296f (diff) | |
| download | courier-libs-60586311ac65a7e1f6acb5869f5d9174d597d8c7.tar.bz2 | |
Fix maildirmake and reformime bugs.
2017-12-26  Sam Varshavchik  <mrsam@courier-mta.com>
	* libs/maildir/maildirmake.c (main): maildirmake's -q option
	will create the maildir if it does not exist.
	* libs/rfc2045/reformime.c (main2): Added -rU option, and a new
	internal RFC2045_RW_8BIT_ALWAYS conversion option.
	* libs/rfc2045/reformime.c (main2): Fix crash when the -s option
	is not valid.
Diffstat (limited to 'rfc2045/reformime.c')
| -rw-r--r-- | rfc2045/reformime.c | 7 | 
1 files changed, 5 insertions, 2 deletions
| diff --git a/rfc2045/reformime.c b/rfc2045/reformime.c index 9851c65..4d1fb67 100644 --- a/rfc2045/reformime.c +++ b/rfc2045/reformime.c @@ -96,6 +96,7 @@ void usage()  	fprintf(stderr, "    -r - rewrite message, filling in missing MIME headers.\n");  	fprintf(stderr, "    -r7 - also convert 8bit/raw encoding to quoted-printable, if possible.\n");  	fprintf(stderr, "    -r8 - also convert quoted-printable encoding to 8bit, if possible.\n"); +	fprintf(stderr, "    -rU - convert quoted-printable encoding to 8bit, unconditionally.\n");  	fprintf(stderr, "    -c charset - default charset for rewriting, -o, and -O.\n");  	fprintf(stderr, "    -m [file] [file]... - create a MIME message digest.\n");  	fprintf(stderr, "    -h \"header\" - decode RFC 2047-encoded header.\n"); @@ -651,7 +652,7 @@ static void extract_section(struct rfc2045 *top_rfcp, const char *mimesection,  	if (mimesection)  	{  		top_rfcp=rfc2045_find(top_rfcp, mimesection); -		if (!mimesection) +		if (!top_rfcp)  			notfound(mimesection);  		if (top_rfcp->firstpart)  		{ @@ -903,7 +904,7 @@ FILE	*fp;  			if (err)	break;  		}  	} while (i < argc); -		 +  	printf("Mime-Version:1.0\n"  		"Content-Type: multipart/digest; boundary=\"%s\"\n\n%s",  			boundarybuf, RFC2045MIMEMSG); @@ -1011,6 +1012,8 @@ int rc=0;  				rwmode=RFC2045_RW_7BIT;  			if (optarg && *optarg == '8')  				rwmode=RFC2045_RW_8BIT; +			if (optarg && *optarg == 'U') +				rwmode=RFC2045_RW_8BIT_ALWAYS;  			break;  		case 'm':  			domimedigest=1; | 
