From 10c65fe9146092902ec80580386ec7955c4dfcb8 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Mon, 19 May 2008 20:24:39 +0000 Subject: [PATCH] 2008-05-19 [colin] 3.4.0cvs55 * src/plugins/pgpcore/sgpgme.c Maybe fix debian bug 481856, 'Segmentation fault when verifying a GPG signature'. Although it looks like a race condition... --- ChangeLog | 7 +++++++ PATCHSETS | 1 + configure.ac | 2 +- src/plugins/pgpcore/sgpgme.c | 13 ++++++++++--- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 07fa688b3..3f91b5efb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-05-19 [colin] 3.4.0cvs55 + + * src/plugins/pgpcore/sgpgme.c + Maybe fix debian bug 481856, 'Segmentation fault + when verifying a GPG signature'. Although it + looks like a race condition... + 2008-05-19 [colin] 3.4.0cvs54 * src/prefs_filtering_action.c diff --git a/PATCHSETS b/PATCHSETS index dcf934190..ac544d608 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -3350,3 +3350,4 @@ ( cvs diff -u -r 1.274.2.241 -r 1.274.2.242 src/mainwindow.c; ) > 3.4.0cvs52.patchset ( cvs diff -u -r 1.105.2.131 -r 1.105.2.132 src/prefs_account.c; ) > 3.4.0cvs53.patchset ( cvs diff -u -r 1.1.4.50 -r 1.1.4.51 src/prefs_filtering_action.c; cvs diff -u -r 1.43.2.72 -r 1.43.2.73 src/prefs_matcher.c; cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/common/tags.c; cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/common/tags.h; cvs diff -u -r 1.1.2.12 -r 1.1.2.13 src/gtk/combobox.c; cvs diff -u -r 1.1.2.10 -r 1.1.2.11 src/gtk/combobox.h; ) > 3.4.0cvs54.patchset +( cvs diff -u -r 1.1.2.50 -r 1.1.2.51 src/plugins/pgpcore/sgpgme.c; ) > 3.4.0cvs55.patchset diff --git a/configure.ac b/configure.ac index a0a423ed3..cff74220e 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=4 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=54 +EXTRA_VERSION=55 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/plugins/pgpcore/sgpgme.c b/src/plugins/pgpcore/sgpgme.c index 6e55ac672..e168590c6 100644 --- a/src/plugins/pgpcore/sgpgme.c +++ b/src/plugins/pgpcore/sgpgme.c @@ -258,11 +258,18 @@ gchar *sgpgme_sigstat_info_full(gpgme_ctx_t ctx, gpgme_verify_result_t status) while (sig) { gpgme_user_id_t user = NULL; gpgme_key_t key; - + gpgme_error_t err; const gchar *keytype, *keyid, *uid; - gpgme_get_key(ctx, sig->fpr, &key, 0); + err = gpgme_get_key(ctx, sig->fpr, &key, 0); + if (err != GPG_ERR_NO_ERROR) { + key = NULL; + g_string_append_printf(siginfo, + _("Error checking signature: %s\n"), + gpgme_strerror(err)); + goto bail; + } if (key) { user = key->uids; keytype = gpgme_pubkey_algo_name( @@ -332,7 +339,7 @@ gchar *sgpgme_sigstat_info_full(gpgme_ctx_t ctx, gpgme_verify_result_t status) i++; sig = sig->next; } - +bail: ret = siginfo->str; g_string_free(siginfo, FALSE); return ret; -- 2.25.1