X-Git-Url: https://git.llucax.com/software/mutt-debian.git/blobdiff_plain/44c01adf506b1087bff724dcb65b92a12b012836..e0fe492429aa15be0fe92b431b66506f2906c892:/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); }