<<< Date Index >>>     <<< Thread Index >>>

Re: bug in crypt-gpgme.c and GPGME backend failure [fixed patch]



On Sat, Jul 14, 2007 at 03:13:08PM +0200, Christoph Ludwig wrote:
> To a): I have a GPG-encrypted mail in my inbox. Whenever I tried to open the
> mail, mutt core dumped in line 1558 of crypt-gpgme.c. It turned out that
> `verify_result = gpgme_op_verify_result (ctx)´ was NULL (which is most likely
> a symptom of my problem (b)) Therefore the following test 
> `if (verify_result->signatures)´ dereferenced a NULL pointer.
> 
> I attached a patch that fixes this bug.

oops, I created the patch before I posted above message and, of course,
introduced a syntax error. The fixed patch that actually compiles is attached.

Regards

Christoph
-- 
FH Worms - University of Applied Sciences
Fachbereich Informatik / Telekommunikation
Erenburgerstr. 19, 67549 Worms, Germany
--- crypt-gpgme.c.orig  2007-06-10 04:52:01.000000000 +0200
+++ crypt-gpgme.c       2007-07-14 15:16:26.000000000 +0200
@@ -1555,7 +1555,7 @@
       {
        /* Check wether signatures have been verified.  */
        gpgme_verify_result_t verify_result = gpgme_op_verify_result (ctx);
-       if (verify_result->signatures)
+       if (verify_result && verify_result->signatures)
          sig_stat = 1;
       }
     }