#include <errno.h>
#include <string.h>
-@@ -60,18 +65,21 @@ enum
- HDR_REPLYTO,
- HDR_FCC,
-
--#ifdef MIXMASTER
-- HDR_MIX,
--#endif
-
+@@ -67,11 +69,17 @@ enum
HDR_CRYPT,
HDR_CRYPTINFO,
+ int ret;
+ HEADER *h = ctx->hdrs[ctx->msgcount];
+
-+ mutt_mktemp (tempfile);
++ mutt_mktemp (tempfile, sizeof(tempfile));
+ if (!(f = safe_fopen (tempfile, "w+")))
+ return -1;
+
+ mutt_message (m);
+
+ cache->index = ctx->hdrs[msgno]->index;
-+ mutt_mktemp (path);
++ mutt_mktemp (path, sizeof(path));
+ cache->path = safe_strdup (path);
+ if (!(msg->fp = safe_fopen (path, "w+")))
+ {