[Gpg4win-commits] [git] Gpg4win - branch, master, updated. gpg4win-2.1.1-62-g15e7a60

by Werner Koch cvs at cvs.gnupg.org
Mon Aug 19 21:39:50 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 for Windows".

The branch, master has been updated
       via  15e7a60fcb60dbcaf046fcf79f9ce158f2869a18 (commit)
      from  714063c31a395f09e6f725d81a17348e37228224 (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 15e7a60fcb60dbcaf046fcf79f9ce158f2869a18
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Aug 19 21:09:39 2013 +0200

    gpa: Add patches to fix card key generation.
    
    * patches/gpa-0.9.4/05-event-done.patch: New.
    * patches/gpgme-1.4.3/01-card-edit.patch: New.
    * Makefile.am (EXTRA_DIST): Add patches.

diff --git a/Makefile.am b/Makefile.am
index 14cd582..fec6ec4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -54,7 +54,9 @@ EXTRA_DIST = autogen.sh README.GIT ONEWS \
         patches/gpa-0.9.4/02-cms-detection.patch \
         patches/gpa-0.9.4/02-x509-import.patch \
         patches/gpa-0.9.4/03-homedir-via-gpgconf.patch \
-        patches/gpa-0.9.4/04-utf-clip-crash.patch
+        patches/gpa-0.9.4/04-utf-clip-crash.patch \
+        patches/gpa-0.9.4/05-event-done.patch \
+	patches/gpgme-1.4.3/01-card-edit.patch
 
 copy-news:
 	cp NEWS doc/website/NEWS.last
diff --git a/patches/gpa-0.9.4/05-event-done.patch b/patches/gpa-0.9.4/05-event-done.patch
new file mode 100755
index 0000000..a9c68c2
--- /dev/null
+++ b/patches/gpa-0.9.4/05-event-done.patch
@@ -0,0 +1,54 @@
+#! /bin/sh
+patch -p1 -l -f $* < $0
+exit $?
+
+From 45eb36a00e0bb39fd02cb065e79cbc53945e7103 Mon Sep 17 00:00:00 2001
+From: Werner Koch <wk at gnupg.org>
+Date: Mon, 19 Aug 2013 20:29:25 +0200
+Subject: [PATCH] Fix wrong use of GPGME_EVENT_DONE.
+
+* src/gpacontext.c (gpa_context_event_cb): Fix use of TYPE_DATA.  Add
+debug output.
+--
+
+With GPGME 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.
+---
+ src/gpacontext.c |   13 +++++++++----
+ 1 files changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/src/gpacontext.c b/src/gpacontext.c
+index e021d5f..b049f84 100644
+--- a/src/gpacontext.c
++++ b/src/gpacontext.c
+@@ -405,16 +405,21 @@ static void
+ gpa_context_event_cb (void *data, gpgme_event_io_t type, void *type_data)
+ {
+   GpaContext *context = data;
+-  gpg_error_t *err;
+-
++  gpg_error_t err, op_err;
++
+   switch (type)
+     {
+     case GPGME_EVENT_START:
+       g_signal_emit (context, signals[START], 0);
+       break;
+     case GPGME_EVENT_DONE:
+-      err = type_data;
+-      g_signal_emit (context, signals[DONE], 0, *err);
++      err = ((gpgme_io_event_done_data_t)type_data)->err;
++      op_err = ((gpgme_io_event_done_data_t)type_data)->op_err;
++      g_debug ("EVENT_DONE: err=%s op_err=%s",
++               gpg_strerror (err), gpg_strerror (op_err));
++      if (!err)
++        err = op_err;
++      g_signal_emit (context, signals[DONE], 0, err);
+       break;
+     case GPGME_EVENT_NEXT_KEY:
+       g_signal_emit (context, signals[NEXT_KEY], 0, type_data);
+--
+1.7.7.1
diff --git a/patches/gpgme-1.4.3/01-card-edit.patch b/patches/gpgme-1.4.3/01-card-edit.patch
new file mode 100755
index 0000000..b0ab3fc
--- /dev/null
+++ b/patches/gpgme-1.4.3/01-card-edit.patch
@@ -0,0 +1,57 @@
+#! /bin/sh
+patch -p1 -l -f $* < $0
+exit $?
+
+From 372bd439834c69d502668007c8c683233d676bd5 Mon Sep 17 00:00:00 2001
+From: Werner Koch <wk at gnupg.org>
+Date: Mon, 19 Aug 2013 20:40:10 +0200
+Subject: 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.
+---
+ src/edit.c |    8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+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)
+--
+1.7.7.1

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

Summary of changes:
 Makefile.am                            |    4 ++-
 patches/gpa-0.9.4/05-event-done.patch  |   54 ++++++++++++++++++++++++++++++
 patches/gpgme-1.4.3/01-card-edit.patch |   57 ++++++++++++++++++++++++++++++++
 3 files changed, 114 insertions(+), 1 deletions(-)
 create mode 100755 patches/gpa-0.9.4/05-event-done.patch
 create mode 100755 patches/gpgme-1.4.3/01-card-edit.patch


hooks/post-receive
-- 
GnuPG for Windows
http://git.gnupg.org



More information about the Gpg4win-commits mailing list