*/
int smime_gpgme_application_handler(struct Body *a, struct State *s)
{
- char tempfile[PATH_MAX];
int is_signed = 0;
int rc = 0;
mutt_debug(2, "Entering handler\n");
a->warnsig = false;
- mutt_mktemp(tempfile, sizeof(tempfile));
- FILE *fpout = mutt_file_fopen(tempfile, "w+");
+ FILE *fpout = mutt_file_mkstemp();
if (!fpout)
{
+ mutt_perror("mutt_file_mkstemp() failed!");
if (s->flags & MUTT_DISPLAY)
{
state_attach_puts(_("[-- Error: could not create temporary file! "
}
mutt_file_fclose(&fpout);
- mutt_file_unlink(tempfile);
mutt_debug(2, "Leaving handler\n");
return rc;