[git] GPGME - branch, master, updated. gpgme-1.10.0-165-g7c220e3

by Andre Heinecke cvs at cvs.gnupg.org
Tue Mar 27 11:29:39 CEST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  7c220e387d511b0cf66f99370759c36b729cc444 (commit)
      from  40a9dea5d56506400b67b0c11f6e55a1629dc6fe (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7c220e387d511b0cf66f99370759c36b729cc444
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Tue Mar 27 11:24:55 2018 +0200

    core: Initialize key return value in gpgme_get_key
    
    * src/keylist.c (gpgme_get_key): Set r_key to NULL.
    
    --
    The c++ bindings and others assumed that r_key is set to NULL
    on error. This is the behavior gpgme_op_keylist_next also
    has. Even if it is not specified what happens to r_key on
    error setting it to NULL should not hurt and is more
    expected behavior.
    
    This directly fixes an uninitialized memory access error
    in the c++ bindings / Kleopatra:
    GnuPG-Bug-Id: T3865
    
    And will fix some additional random crashes in Kleopatra and GpgOL.

diff --git a/src/keylist.c b/src/keylist.c
index 7956935..9c5bd4e 100644
--- a/src/keylist.c
+++ b/src/keylist.c
@@ -1269,6 +1269,8 @@ gpgme_get_key (gpgme_ctx_t ctx, const char *fpr, gpgme_key_t *r_key,
   if (!ctx || !r_key || !fpr)
     return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE));
 
+  *r_key = NULL;
+
   if (strlen (fpr) < 8)	/* We have at least a key ID.  */
     return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE));
 

-----------------------------------------------------------------------

Summary of changes:
 src/keylist.c | 2 ++
 1 file changed, 2 insertions(+)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list