]> granicus.if.org Git - neomutt/commitdiff
Return an error in pgp_decrypt_part when the PGP output file is empty.
authorThomas Roessler <roessler@does-not-exist.org>
Thu, 27 Jan 2005 20:26:52 +0000 (20:26 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Thu, 27 Jan 2005 20:26:52 +0000 (20:26 +0000)
pgp.c

diff --git a/pgp.c b/pgp.c
index 685b9e5fb9363a9b07c91462cd761b466d093dd8..079014f08d6c79be1944e67bd73c628c5eacc4a8 100644 (file)
--- a/pgp.c
+++ b/pgp.c
@@ -796,6 +796,10 @@ BODY *pgp_decrypt_part (BODY *a, STATE *s, FILE *fpout, BODY *p)
 
   fflush (fpout);
   rewind (fpout);
+  
+  if (feof (fpout))
+    return NULL;
+  
   if ((tattach = mutt_read_mime_header (fpout, 0)) != NULL)
   {
     /*
@@ -840,7 +844,7 @@ int pgp_decrypt_mime (FILE *fpin, FILE **fpout, BODY *b, BODY **cur)
 
   rewind (*fpout);
   
-  if (!*cur) 
+  if (!*cur)
     return -1;
   
   return (0);