2010-02-02 Colin Leroy <colin@colino.net>
authorColin Leroy <colin@colino.net>
Tue, 2 Feb 2010 19:03:09 +0000 (19:03 +0000)
committerColin Leroy <colin@colino.net>
Tue, 2 Feb 2010 19:03:09 +0000 (19:03 +0000)
* patches/claws-mail-3.7.4cvs1/01-bug_2098.patch: Add patch from
upstream to fix double-free crash on PGP core.

ChangeLog
patches/claws-mail-3.7.4cvs1/01-bug_2098.patch [new file with mode: 0755]

index f491482..9f6e7e5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-02-02  Colin Leroy  <colin@colino.net>
+
+       * patches/claws-mail-3.7.4cvs1/01-bug_2098.patch: Add patch from 
+       upstream to fix double-free crash on PGP core. 
+
 2010-02-02  Werner Koch  <wk@g10code.com>
 
        * src/gpg4win.mk.in (README.$(1).txt): Implement beta-warning hack.
diff --git a/patches/claws-mail-3.7.4cvs1/01-bug_2098.patch b/patches/claws-mail-3.7.4cvs1/01-bug_2098.patch
new file mode 100755 (executable)
index 0000000..4feda3b
--- /dev/null
@@ -0,0 +1,38 @@
+#! /bin/sh
+patch -p0 -f $* < $0
+exit $?
+
+2010-01-16 [colin]      3.7.4cvs4
+
+        * src/plugins/pgpcore/sgpgme.c
+                Probably fix bug 2098, 'claws-mails crashes frequently 
+                with pgpcore'. Fix double-free.
+
+Index: src/plugins/pgpcore/sgpgme.c
+===================================================================
+RCS file: /home/claws-mail/claws/src/plugins/pgpcore/Attic/sgpgme.c,v
+retrieving revision 1.1.2.65
+retrieving revision 1.1.2.66
+diff -u -p -u -r1.1.2.65 -r1.1.2.66
+--- src/plugins/pgpcore/sgpgme.c       20 Oct 2009 17:40:30 -0000      1.1.2.65
++++ src/plugins/pgpcore/sgpgme.c       16 Jan 2010 18:19:42 -0000      1.1.2.66
+@@ -860,15 +860,17 @@ check_again:
+       if (!err)
+               err = gpgme_op_keylist_next(ctx, &key);
+       gpgme_op_keylist_end(ctx);
+-      gpgme_release(ctx);
+       if (gpg_err_code(err) == GPG_ERR_EOF) {
+               if (gpgme_get_protocol(ctx) != GPGME_PROTOCOL_CMS) {
+                       gpgme_set_protocol(ctx, GPGME_PROTOCOL_CMS);
+                       goto check_again;
+               }
++              gpgme_release(ctx);
+               return FALSE;
+-      } else
++      } else {
++              gpgme_release(ctx);
+               return TRUE;
++      }
+ }
+ void sgpgme_check_create_key(void)