Nico Golde:
authornion <nion@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Sun, 7 Aug 2005 16:58:34 +0000 (16:58 +0000)
committernion <nion@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Sun, 7 Aug 2005 16:58:34 +0000 (16:58 +0000)
- fixed segfault if pgpout is NULL

git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@375 e385b8ad-14ed-0310-8656-cc95a2468c6d

pgp.c

diff --git a/pgp.c b/pgp.c
index a2ad019..fccf7a9 100644 (file)
--- a/pgp.c
+++ b/pgp.c
@@ -364,10 +364,11 @@ void pgp_application_pgp_handler (BODY * m, STATE * s)
       }
 
       /* treat empty result as sign of failure */
-      if (! ftell(pgpout)) {
-        mutt_error _("Could not decrypt PGP message");
-        goto out;
-      }
+      if (pgpout !=NULL)
+        if (! ftell(pgpout)) {
+          mutt_error _("Could not decrypt PGP message");
+          goto out;
+        }
 
       /*
        * Now, copy cleartext to the screen.  NOTE - we expect that PGP