diff options
| author | Sam Varshavchik | 2017-11-26 09:41:43 -0500 | 
|---|---|---|
| committer | Sam Varshavchik | 2017-11-26 09:47:12 -0500 | 
| commit | 95e0ece16f52b1ab0f000fbbe2466fbc1922ed75 (patch) | |
| tree | 65fef25942b89f3341a2ce7d3b3267b2001d55c1 /rfc2045/rfc2045reply.c | |
| parent | 33eb8ed082d4a5f9a6d7f221e539cd8c6e3fb979 (diff) | |
| download | courier-libs-95e0ece16f52b1ab0f000fbbe2466fbc1922ed75.tar.bz2 | |
mailbot: fix null pointer dereferences.
Diffstat (limited to 'rfc2045/rfc2045reply.c')
| -rw-r--r-- | rfc2045/rfc2045reply.c | 13 | 
1 files changed, 8 insertions, 5 deletions
| diff --git a/rfc2045/rfc2045reply.c b/rfc2045/rfc2045reply.c index d145d06..cc2cbd8 100644 --- a/rfc2045/rfc2045reply.c +++ b/rfc2045/rfc2045reply.c @@ -133,10 +133,12 @@ static void mksalutation_cb(const char *salutation_template,  			(*callback_func)(CBSTR(sender_name));  			break;  		case 'd': -			mksalutation_datefmt(fmt_start, -					     fmt_end, -					     date, -					     callback_func, callback_arg); +			if (date) +				mksalutation_datefmt(fmt_start, +						     fmt_end, +						     date, +						     callback_func, +						     callback_arg);  			break;  		case 's':  			(*callback_func)(CBSTR(subject)); @@ -1139,7 +1141,8 @@ static int mkreply(struct rfc2045_mkreplyinfo *ri)  				      newsgroups ? newsgroups:"",  				      sender_addr ? sender_addr:"(no address given)", -				      sender_name ? sender_name:sender_addr, +				      sender_name ? sender_name: +				      sender_addr ? sender_addr:"@",  				      date,  				      subject,  				      ri->charset); | 
