I see this also. Actually I reported a bug about this (or something very similar) many years ago (13 in fact), which Thomas provided a fix for. I wonder if it just got regressed somwehre along the line, or if there was a separate issue (or perhaps the original fix was incomplete). I've been too lazy to report it again, but I can confirm that it still happens for me with more recent mutt versions.
http://marc.info/?l=mutt-dev&m=103964554117728&w=2 -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail due to spam prevention. Sorry for the inconvenience. On Sat, Feb 28, 2015 at 08:45:34PM +0100, Dennis Preiser wrote: > Hello, > > I've observed the following issue with mutt: > > When multiple > > -----BEGIN PGP xyz—— > -----END PGP xyz—— > > blocks are present and <check-traditional-pgp> (Esc P) was invoked, mutt > leaves temporary files in $TMPDIR. > > Root cause seems to be pgp.c:pgp_application_pgp_handler(). If multiple > blocks are present (a signature and a public key; more then one public > key etc.) mutt_mktemp() and safe_fopen() are called multiple times for > tmpfname and outfile without closing and unlinking before. > > Attached is a sample mbox file with two public key blocks. To reproduce > this issue open the mbox, invoke <check-traditional-pgp> (Esc P), quit > mutt and inspect $TMPDIR. > > The attached patch fixes this for me. > > Dennis > diff -urp mutt-1.5.23hg_orig/pgp.c mutt-1.5.23hg/pgp.c > --- mutt-1.5.23hg_orig/pgp.c 2015-01-28 09:00:03.000000000 +0100 > +++ mutt-1.5.23hg/pgp.c 2015-02-26 12:39:21.000000000 +0100 > @@ -444,6 +444,16 @@ int pgp_application_pgp_handler (BODY *m > mutt_error _("Could not decrypt PGP message"); > mutt_sleep (1); > rc = -1; > + if (tmpfp) > + { > + safe_fclose (&tmpfp); > + mutt_unlink (tmpfname); > + } > + if (pgpout) > + { > + safe_fclose (&pgpout); > + mutt_unlink (outfile); > + } > goto out; > } > } > @@ -501,6 +511,16 @@ int pgp_application_pgp_handler (BODY *m > else > state_attach_puts (_("[-- END PGP SIGNED MESSAGE --]\n"), s); > } > + if (tmpfp) > + { > + safe_fclose (&tmpfp); > + mutt_unlink (tmpfname); > + } > + if (pgpout) > + { > + safe_fclose (&pgpout); > + mutt_unlink (outfile); > + } > } > else > { > @@ -517,17 +537,6 @@ int pgp_application_pgp_handler (BODY *m > out: > m->goodsig = (maybe_goodsig && have_any_sigs); > > - if (tmpfp) > - { > - safe_fclose (&tmpfp); > - mutt_unlink (tmpfname); > - } > - if (pgpout) > - { > - safe_fclose (&pgpout); > - mutt_unlink (outfile); > - } > - > FREE(&gpgcharset); > > if (needpass == -1) > From [email protected] Wed Dec 26 18:45:17 2012 > Date: Wed, 26 Dec 2012 18:45:16 +0100 > From: Dennis Preiser <[email protected]> > To: Dennis Preiser <[email protected]> > Subject: message with multiple PGP public keys > Message-ID: <[email protected]> > MIME-Version: 1.0 > Content-Type: text/plain; charset=utf-8 > Content-Transfer-Encoding: 8bit > Status: RO > > Lorem ipsum dolor sit amet, consectetur, adipisci velit … > > pub 2048R/F9C68CE7 2011-10-05 Dennis Preiser <[email protected]> > uid Dennis Preiser <[email protected]> > sub 2048R/49C64B1D 2011-10-05 > > pub 2048R/F9C68CE7 2011-10-05 Dennis Preiser <[email protected]> > uid Dennis Preiser <[email protected]> > sub 2048R/49C64B1D 2011-10-05 >
pgp0VD4zd4L8t.pgp
Description: PGP signature
