X-Git-Url: https://git.llucax.com/software/mutt-debian.git/blobdiff_plain/899a5db7020e23f7763353437e02effc332484cb..594a6a48c983f012a70323047c723ef48883934a:/recvcmd.c diff --git a/recvcmd.c b/recvcmd.c index 5f4511f..4ae7d68 100644 --- a/recvcmd.c +++ b/recvcmd.c @@ -435,7 +435,7 @@ static void attach_forward_bodies (FILE * fp, HEADER * hdr, tmphdr->env = mutt_new_envelope (); mutt_make_forward_subject (tmphdr->env, Context, parent); - mutt_mktemp (tmpbody); + mutt_mktemp (tmpbody, sizeof (tmpbody)); if ((tmpfp = safe_fopen (tmpbody, "w")) == NULL) { mutt_error (_("Can't open temporary file %s."), tmpbody); @@ -613,7 +613,7 @@ static void attach_forward_msgs (FILE * fp, HEADER * hdr, /* no MIME encapsulation */ - mutt_mktemp (tmpbody); + mutt_mktemp (tmpbody, sizeof (tmpbody)); if (!(tmpfp = safe_fopen (tmpbody, "w"))) { mutt_error (_("Can't create %s."), tmpbody); @@ -863,7 +863,7 @@ void mutt_attach_reply (FILE * fp, HEADER * hdr, return; } - mutt_mktemp (tmpbody); + mutt_mktemp (tmpbody, sizeof (tmpbody)); if ((tmpfp = safe_fopen (tmpbody, "w")) == NULL) { mutt_error (_("Can't create %s."), tmpbody); @@ -942,7 +942,8 @@ void mutt_attach_reply (FILE * fp, HEADER * hdr, safe_fclose (&tmpfp); - if (ci_send_message (flags, tmphdr, tmpbody, NULL, parent) == 0) + if (ci_send_message (flags, tmphdr, tmpbody, NULL, + parent ? parent : (cur ? cur->hdr : NULL)) == 0) mutt_set_flag (Context, hdr, M_REPLIED, 1); }