[git] GPGME - branch, master, updated. gpgme-1.5.3-5-g8cfcdfe

by Werner Koch cvs at cvs.gnupg.org
Mon Mar 16 13:42:25 CET 2015


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  8cfcdfe5564f87362e5ec1bfdca5c14aed9c45f0 (commit)
       via  119f27032b822ace8c012b96f9e41bcf23251a54 (commit)
      from  428ea7696585bc24d127b903840554ca659069b6 (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 8cfcdfe5564f87362e5ec1bfdca5c14aed9c45f0
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Mar 16 13:40:34 2015 +0100

    Fix potential crash in trace macro.
    
    * src/signers.c (gpgme_signers_add): Avoid deref of a NULL KEY in the
    trace macro.
    * src/engine-spawn.c (engspawn_release): Remove always true condition.
    * src/engine-gpg.c (gpg_release): Ditto.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/src/engine-gpg.c b/src/engine-gpg.c
index 30c3bfb..57aea8b 100644
--- a/src/engine-gpg.c
+++ b/src/engine-gpg.c
@@ -396,8 +396,7 @@ gpg_release (void *engine)
     {
       struct arg_and_data_s *next = gpg->arglist->next;
 
-      if (gpg->arglist)
-	free (gpg->arglist);
+      free (gpg->arglist);
       gpg->arglist = next;
     }
 
diff --git a/src/engine-spawn.c b/src/engine-spawn.c
index 28a14be..eb4e038 100644
--- a/src/engine-spawn.c
+++ b/src/engine-spawn.c
@@ -355,8 +355,7 @@ engspawn_release (void *engine)
     {
       struct datalist_s *next = esp->arglist->next;
 
-      if (esp->arglist)
-	free (esp->arglist);
+      free (esp->arglist);
       esp->arglist = next;
     }
 
diff --git a/src/signers.c b/src/signers.c
index f43fafc..f540d70 100644
--- a/src/signers.c
+++ b/src/signers.c
@@ -66,7 +66,7 @@ gpgme_error_t
 gpgme_signers_add (gpgme_ctx_t ctx, const gpgme_key_t key)
 {
   TRACE_BEG2 (DEBUG_CTX, "gpgme_signers_add", ctx,
-	      "key=%p (%s)", key, (key->subkeys && key->subkeys->fpr) ?
+	      "key=%p (%s)", key, (key && key->subkeys && key->subkeys->fpr) ?
 	      key->subkeys->fpr : "invalid");
 
   if (!ctx || !key)

commit 119f27032b822ace8c012b96f9e41bcf23251a54
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Mar 16 13:38:10 2015 +0100

    Fix one byte too short malloc.
    
    * src/engine-spawn.c (add_data): Fix malloc
    --
    
    Bummer.  Why did I subtracted one from the size?  Did I assume a
    dynamically allocated structure with a string field which was not
    going to be used?  Very strange.
    
    Not a real problem though because malloc will anyway round up the
    allocation to at least the next word size.
    
    Detected by Stack 0.3.

diff --git a/src/engine-spawn.c b/src/engine-spawn.c
index 8ffc628..28a14be 100644
--- a/src/engine-spawn.c
+++ b/src/engine-spawn.c
@@ -120,7 +120,7 @@ add_data (engine_spawn_t esp, gpgme_data_t data, int dup_to, int inbound)
   assert (esp);
   assert (data);
 
-  a = malloc (sizeof *a - 1);
+  a = malloc (sizeof *a);
   if (!a)
     return gpg_error_from_syserror ();
   a->next = NULL;

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

Summary of changes:
 src/engine-gpg.c   | 3 +--
 src/engine-spawn.c | 5 ++---
 src/signers.c      | 2 +-
 3 files changed, 4 insertions(+), 6 deletions(-)


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




More information about the Gnupg-commits mailing list