after a failed transformation.
status = convert_charsets (*ctp, fx->textcharset, &message_mods);
}
status = convert_charsets (*ctp, fx->textcharset, &message_mods);
}
- if (! (*ctp)->c_umask) {
+ if (status == OK && ! (*ctp)->c_umask) {
/* Set the umask for the contents file. This currently
isn't used but just in case it is in the future. */
struct stat st;
/* Set the umask for the contents file. This currently
isn't used but just in case it is in the future. */
struct stat st;
struct multipart *mp;
int status = OK;
struct multipart *mp;
int status = OK;
- if (bogus_mp_content) {
+ if (ct && (*ct)->c_type == CT_MULTIPART && bogus_mp_content) {
mp = (struct multipart *) (*ct)->c_ctparams;
/*
mp = (struct multipart *) (*ct)->c_ctparams;
/*
"fix multipart boundary");
}
} else {
"fix multipart boundary");
}
} else {
advise (NULL, "unable to parse fixed part");
status = NOTOK;
}
advise (NULL, "unable to parse fixed part");
status = NOTOK;
}
}
free_content (tp_part);
}
free_content (tp_part);
- (void) m_unlink (tmp_plain_file);
+ if (tmp_plain_file) { (void) m_unlink (tmp_plain_file); }
free (tmp_plain_file);
return NULL;
free (tmp_plain_file);
return NULL;