case 'c':
/* insert charset */
- if (ct->c_charset) {
- strncpy(bp, ct->c_charset, buflen);
- }
+ strncpy(bp, ct->c_charset ? ct->c_charset :
+ "US-ASCII", buflen);
break;
case 'd':
** if it is not a text part of a multipart/alternative
*/
if (!alternate || ct->c_subtype == TEXT_PLAIN) {
- if (!check_charset(ct->c_charset, strlen(ct->c_charset))) {
+ if (ct->c_charset && !check_charset(ct->c_charset,
+ strlen(ct->c_charset))) {
snprintf(buffer, sizeof(buffer), "%%liconv -f '%s'",
ct->c_charset);
} else {
case 'c':
/* insert charset */
- if (ct->c_charset) {
- strncpy(bp, ct->c_charset, buflen);
- }
+ strncpy(bp, ct->c_charset ? ct->c_charset :
+ "US-ASCII", buflen);
break;
case 'd':