+ 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+")))
+ {