]> granicus.if.org Git - neomutt/commitdiff
Fix #1442 (thanks, Dale); properly initialize some pointers which
authorThomas Roessler <roessler@does-not-exist.org>
Fri, 31 Jan 2003 00:12:02 +0000 (00:12 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Fri, 31 Jan 2003 00:12:02 +0000 (00:12 +0000)
could otherwise lead to crashes.

pgp.c

diff --git a/pgp.c b/pgp.c
index bb48f4d0300a3012591d08d44c5aa7014ee332bd..1af91c23cf66e54602e43208b0beef1eaf97c002 100644 (file)
--- a/pgp.c
+++ b/pgp.c
@@ -367,13 +367,10 @@ void pgp_application_pgp_handler (BODY *m, STATE *s)
        FGETCONV *fc;
        int c;
        rewind (pgpout);
+       state_set_prefix (s);
        fc = fgetconv_open (pgpout, "utf-8", Charset, 0);
        while ((c = fgetconv (fc)) != EOF)
-       {
-         state_putc (c, s);
-         if (c == '\n' && s->prefix)
-           state_puts (s->prefix, s);
-       }
+         state_prefix_putc (c, s);
        fgetconv_close (&fc);
       }
 
@@ -1021,7 +1018,7 @@ char *pgp_findKeys (ADDRESS *to, ADDRESS *cc, ADDRESS *bcc)
   ADDRESS **last = &tmp;
   ADDRESS *p, *q;
   int i;
-  pgp_key_t k_info, key;
+  pgp_key_t k_info = NULL, key = NULL;
 
   const char *fqdn = mutt_fqdn (1);