[git] GPGME - branch, master, updated. gpgme-1.4.2-13-gb0aaa3f

by Werner Koch cvs at cvs.gnupg.org
Mon Aug 19 21:27:25 CEST 2013


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  b0aaa3f9aef36634b5c391812362f016114f02ba (commit)
       via  372bd439834c69d502668007c8c683233d676bd5 (commit)
       via  eae9c32bd9c80ca4a4ecf794808211808f2ebbdd (commit)
      from  d788c35e19df9eade8eb0b880ca1dc47ae7928ad (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 b0aaa3f9aef36634b5c391812362f016114f02ba
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Aug 19 20:43:19 2013 +0200

    Document API change for GPGME_EVENT_DONE from 2009.
    
    * doc/gpgme.texi (I/O Callback Interface): Fix description for the
    event arg.
    --
    
    With commit c8e934b2 (2009-10-26) gpgme_io_event_done_data_t was
    introduced to replace the use of gpg_error_t with GPGME_EVENT_DONE.
    Unfortunately this was not documented.  Maybe at that time the event
    code was considered internal and its use in GPA was not known.  Too
    bad.

diff --git a/doc/gpgme.texi b/doc/gpgme.texi
index 4ec0bfe..18b3c94 100644
--- a/doc/gpgme.texi
+++ b/doc/gpgme.texi
@@ -5335,9 +5335,9 @@ callback handlers must not be run before this event is signalled.
 @item GPGME_EVENT_DONE
 The operation is finished, the last I/O callback for this operation
 was removed.  The accompanying @var{type_data} points to a
- at code{gpgme_error_t} variable that contains the status of the operation
-that finished.  This event is signalled after the last I/O callback
-has been removed.
+ at code{struct gpgme_io_event_done_data} variable that contains the
+status of the operation that finished.  This event is signalled after
+the last I/O callback has been removed.
 
 @item GPGME_EVENT_NEXT_KEY
 In a @code{gpgme_op_keylist_start} operation, the next key was

commit 372bd439834c69d502668007c8c683233d676bd5
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Aug 19 20:40:10 2013 +0200

    Fix possible segv in the gpgme_op_card_edit.
    
    * src/edit.c (gpgme_op_edit_start, gpgme_op_card_edit_start): Do not
    deref a NULL KEY in TRACE_BEG.

diff --git a/src/edit.c b/src/edit.c
index 1f73078..72fa458 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -143,7 +143,7 @@ gpgme_op_edit_start (gpgme_ctx_t ctx, gpgme_key_t key,
 
   TRACE_BEG5 (DEBUG_CTX, "gpgme_op_edit_start", ctx,
 	      "key=%p (%s), fnc=%p fnc_value=%p, out=%p", key,
-	      (key->subkeys && key->subkeys->fpr) ?
+	      (key && key->subkeys && key->subkeys->fpr) ?
 	      key->subkeys->fpr : "invalid", fnc, fnc_value, out);
 
   if (!ctx)
@@ -164,7 +164,7 @@ gpgme_op_edit (gpgme_ctx_t ctx, gpgme_key_t key,
 
   TRACE_BEG5 (DEBUG_CTX, "gpgme_op_edit", ctx,
 	      "key=%p (%s), fnc=%p fnc_value=%p, out=%p", key,
-	      (key->subkeys && key->subkeys->fpr) ?
+	      (key && key->subkeys && key->subkeys->fpr) ?
 	      key->subkeys->fpr : "invalid", fnc, fnc_value, out);
 
   if (!ctx)
@@ -187,7 +187,7 @@ gpgme_op_card_edit_start (gpgme_ctx_t ctx, gpgme_key_t key,
 
   TRACE_BEG5 (DEBUG_CTX, "gpgme_op_card_edit_start", ctx,
 	      "key=%p (%s), fnc=%p fnc_value=%p, out=%p", key,
-	      (key->subkeys && key->subkeys->fpr) ?
+	      (key && key->subkeys && key->subkeys->fpr) ?
 	      key->subkeys->fpr : "invalid", fnc, fnc_value, out);
 
   if (!ctx)
@@ -208,7 +208,7 @@ gpgme_op_card_edit (gpgme_ctx_t ctx, gpgme_key_t key,
 
   TRACE_BEG5 (DEBUG_CTX, "gpgme_op_card_edit", ctx,
 	      "key=%p (%s), fnc=%p fnc_value=%p, out=%p", key,
-	      (key->subkeys && key->subkeys->fpr) ?
+	      (key && key->subkeys && key->subkeys->fpr) ?
 	      key->subkeys->fpr : "invalid", fnc, fnc_value, out);
 
   if (!ctx)

commit eae9c32bd9c80ca4a4ecf794808211808f2ebbdd
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Aug 19 20:38:36 2013 +0200

    tests: Fix NULL ptr deref in gpgsm/t-verify.
    
    * tests/gpgsm/t-verify.c (check_result): Do not dereference a sig or
    sig->fpr if NULL.

diff --git a/tests/gpgsm/t-verify.c b/tests/gpgsm/t-verify.c
index a26617e..901b46f 100644
--- a/tests/gpgsm/t-verify.c
+++ b/tests/gpgsm/t-verify.c
@@ -63,6 +63,8 @@ check_result (gpgme_verify_result_t result, int summary, char *fpr,
       fprintf (stderr, "%s:%i: Unexpected number of signatures\n",
 	       __FILE__, __LINE__);
       got_errors = 1;
+      if (!sig)
+        return;
     }
   if (sig->summary != summary)
     {
@@ -71,7 +73,7 @@ check_result (gpgme_verify_result_t result, int summary, char *fpr,
 	       __FILE__, __LINE__, summary, sig->summary);
       got_errors = 1;
     }
-  if (strcmp (sig->fpr, fpr))
+  if (sig->fpr && strcmp (sig->fpr, fpr))
     {
       fprintf (stderr, "%s:%i: Unexpected fingerprint: %s\n",
 	       __FILE__, __LINE__, sig->fpr);

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

Summary of changes:
 doc/gpgme.texi         |    6 +++---
 src/edit.c             |    8 ++++----
 tests/gpgsm/t-verify.c |    4 +++-
 3 files changed, 10 insertions(+), 8 deletions(-)


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




More information about the Gnupg-commits mailing list