[balsa/wip/gmime3: 33/197] Do not dereference a NULL pointer
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/wip/gmime3: 33/197] Do not dereference a NULL pointer
- Date: Wed, 23 May 2018 21:15:08 +0000 (UTC)
commit 6a224fca2706820f66d4813c5cef38963cb340de
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Mon Jul 17 11:25:14 2017 -0400
Do not dereference a NULL pointer
* libbalsa/libbalsa-gpgme.c (get_key_from_name): do not
dereference a NULL pointer.
ChangeLog | 24 ++++++++++++++++++++++++
libbalsa/libbalsa-gpgme.c | 3 ++-
2 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f2c14a3..52bb733 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2017-07-17 Peter Bloomfield <pbloomfield bellsouth net>
+
+ * libbalsa/libbalsa-gpgme.c (get_key_from_name): do not
+ dereference a NULL pointer.
+
+2017-07-17 Peter Bloomfield <pbloomfield bellsouth net>
+
+ Avoid some whining from the clang static analyzer
+
+ * libbalsa/libbalsa-gpgme-keys.c (gpgme_import_key):
+ value stored to 'gpgme_err' is never read.
+ * libbalsa/libbalsa-gpgme-widgets.c (create_subkey_widget):
+ value stored to 'subkey_row' is never read.
+
+2017-07-17 Peter Bloomfield <pbloomfield bellsouth net>
+
+ * src/balsa-mime-widget-message.c (foreach_label): the only
+ children that have a "populate-popup" signal are GtkLabels.
+
+2017-07-16 Peter Bloomfield <pbloomfield bellsouth net>
+
+ * libbalsa/server.c (libbalsa_server_load_config): dereference
+ server->cert_passphrase.
+
2017-07-15 Peter Bloomfield <pbloomfield bellsouth net>
Do not use local variables that shadow other variables
diff --git a/libbalsa/libbalsa-gpgme.c b/libbalsa/libbalsa-gpgme.c
index d0641bd..3f71895 100644
--- a/libbalsa/libbalsa-gpgme.c
+++ b/libbalsa/libbalsa-gpgme.c
@@ -791,7 +791,8 @@ get_key_from_name(gpgme_ctx_t ctx,
/* OpenPGP: ask the user if a low-validity key should be trusted for encryption */
// FIXME - shouldn't we do the same for S/MIME?
- if ((result == GPG_ERR_NO_ERROR) && !secret && !accept_all && (gpgme_get_protocol(ctx) ==
GPGME_PROTOCOL_OpenPGP) &&
+ if ((selected != NULL) &&
+ (result == GPG_ERR_NO_ERROR) && !secret && !accept_all && (gpgme_get_protocol(ctx) ==
GPGME_PROTOCOL_OpenPGP) &&
(selected->owner_trust < GPGME_VALIDITY_FULL)) {
if ((accept_low_trust_cb == NULL) || !accept_low_trust_cb(name, selected, parent)) {
gpgme_key_unref(selected);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]