diff options
| author | Sam Varshavchik | 2018-08-09 06:46:12 -0400 | 
|---|---|---|
| committer | Sam Varshavchik | 2018-08-09 06:46:12 -0400 | 
| commit | bb5416445b1e6c1cbfeb32ac1a233e041af699ce (patch) | |
| tree | b24b354306f0f07e2df90bd85b98c8a4c6b41699 | |
| parent | b843eef0a9233aa7d028a3328b00b18595f3b2e2 (diff) | |
| download | courier-libs-bb5416445b1e6c1cbfeb32ac1a233e041af699ce.tar.bz2 | |
reformime: fix crash when -e is specified without a -s.
| -rw-r--r-- | rfc2045/reformime.c | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/rfc2045/reformime.c b/rfc2045/reformime.c index 8bdfa6c..302fdc6 100644 --- a/rfc2045/reformime.c +++ b/rfc2045/reformime.c @@ -1197,10 +1197,11 @@ int rc=0;  	}  	else if (dodecode)  	{ -		mimesection = strtok(section,","); +		mimesection = section ? strtok(section,","):NULL;  		do {  			print_decode(p, mimesection); -			mimesection = strtok(NULL,","); +			if (mimesection) +				mimesection = strtok(NULL,",");  		} while (mimesection != NULL);  	}  	else if (dorewrite)  | 
