X-Git-Url: https://git.llucax.com/software/mutt-debian.git/blobdiff_plain/14c29200cb58d3c4a0830265f2433849781858d0..20f65ac3b82b354496b5bb469ff184ba8b0bcd96:/crypt.c diff --git a/crypt.c b/crypt.c index 67d7276..0bd2f30 100644 --- a/crypt.c +++ b/crypt.c @@ -1,6 +1,6 @@ /* * Copyright (C) 1996,1997 Michael R. Elkins - * Copyright (C) 1999-2000 Thomas Roessler + * Copyright (C) 1999-2000,2002-4,2006 Thomas Roessler * Copyright (C) 2001 Thomas Roessler * Oliver Ehli * Copyright (C) 2003 Werner Koch @@ -30,7 +30,6 @@ #include "mime.h" #include "copy.h" #include "mutt_crypt.h" -#include "pgp.h" #include #include @@ -539,7 +538,7 @@ int crypt_write_signed(BODY *a, STATE *s, const char *tempfile) fputc (c, fp); } - fclose (fp); + safe_fclose (&fp); return 0; } @@ -594,7 +593,7 @@ void crypt_extract_keys_from_messages (HEADER * h) if (!WithCrypto) return; - mutt_mktemp (tempfname); + mutt_mktemp (tempfname, sizeof (tempfname)); if (!(fpout = safe_fopen (tempfname, "w"))) { mutt_perror (tempfname); @@ -614,7 +613,7 @@ void crypt_extract_keys_from_messages (HEADER * h) if (Context->hdrs[Context->v2r[i]]->security & ENCRYPT && !crypt_valid_passphrase (Context->hdrs[Context->v2r[i]]->security)) { - fclose (fpout); + safe_fclose (&fpout); break; } @@ -696,7 +695,7 @@ void crypt_extract_keys_from_messages (HEADER * h) } } - fclose (fpout); + safe_fclose (&fpout); if (isendwin()) mutt_any_key_to_continue (NULL); @@ -845,7 +844,7 @@ int mutt_signed_handler (BODY *a, STATE *s) if (sigcnt) { - mutt_mktemp (tempfile); + mutt_mktemp (tempfile, sizeof (tempfile)); if (crypt_write_signed (a, s, tempfile) == 0) { for (i = 0; i < sigcnt; i++)