[git] GnuPG - branch, master, updated. gnupg-2.1.20-75-g0dec0cc

by NIIBE Yutaka cvs at cvs.gnupg.org
Mon Apr 17 02:19:13 CEST 2017


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 "The GNU Privacy Guard".

The branch, master has been updated
       via  0dec0cc281dfa26db89f8cc5ee002dea5c2b2e81 (commit)
       via  af5f8ecf51f5e1f33e832d4946d02313b78a0536 (commit)
      from  36c4e540f1a4992675ee6e0acca1231325457079 (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 0dec0cc281dfa26db89f8cc5ee002dea5c2b2e81
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Mon Apr 17 09:15:13 2017 +0900

    g10: Minor fixes.
    
    * g10/export.c (cleartext_secret_key_to_openpgp): No initialization.
    (do_export_one_keyblock): Initialize with GPG_ERR_NOT_FOUND.
    * g10/getkey.c (get_best_pubkey_byname): Add non-null check.
    * g10/tofu.c (tofu_set_policy): ERR initialize to 0.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/g10/export.c b/g10/export.c
index 9b203e3..ce79a2f 100644
--- a/g10/export.c
+++ b/g10/export.c
@@ -580,7 +580,7 @@ canon_pk_algo (enum gcry_pk_algos algo)
 static gpg_error_t
 cleartext_secret_key_to_openpgp (gcry_sexp_t s_key, PKT_public_key *pk)
 {
-  gpg_error_t err = gpg_error (GPG_ERR_NOT_IMPLEMENTED);
+  gpg_error_t err;
   gcry_sexp_t top_list;
   gcry_sexp_t key = NULL;
   char *key_type = NULL;
@@ -1539,7 +1539,7 @@ do_export_one_keyblock (ctrl_t ctrl, kbnode_t keyblock, u32 *keyid,
                         KEYDB_SEARCH_DESC *desc, size_t ndesc,
                         size_t descindex, gcry_cipher_hd_t cipherhd)
 {
-  gpg_error_t err;
+  gpg_error_t err = gpg_error (GPG_ERR_NOT_FOUND);
   char *cache_nonce = NULL;
   subkey_list_t subkey_list = NULL;  /* Track already processed subkeys. */
   int skip_until_subkey = 0;
diff --git a/g10/getkey.c b/g10/getkey.c
index dab63fa..75b8564 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -1654,7 +1654,8 @@ get_best_pubkey_byname (ctrl_t ctrl, GETKEY_CTX *retctx, PKT_public_key *pk,
                   if (! ctx->kr_handle)
                     {
                       xfree (ctx);
-                      *retctx = NULL;
+                      if (retctx)
+                        *retctx = NULL;
                       rc = gpg_error_from_syserror ();
                     }
                   else
diff --git a/g10/tofu.c b/g10/tofu.c
index 4e12905..7bef27b 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -3857,7 +3857,7 @@ tofu_get_validity (ctrl_t ctrl, PKT_public_key *pk, strlist_t user_id_list,
 gpg_error_t
 tofu_set_policy (ctrl_t ctrl, kbnode_t kb, enum tofu_policy policy)
 {
-  gpg_error_t err;
+  gpg_error_t err = 0;
   time_t now = gnupg_get_time ();
   tofu_dbs_t dbs;
   PKT_public_key *pk;

commit af5f8ecf51f5e1f33e832d4946d02313b78a0536
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Mon Apr 17 09:08:31 2017 +0900

    g10: Fix import/export filter property match.
    
    * g10/import.c (impex_filter_getval): Fix to "else if".
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/g10/import.c b/g10/import.c
index 54d649b..ba1c44a 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -1261,7 +1261,7 @@ impex_filter_getval (void *cookie, const char *propname)
           snprintf (numbuf, sizeof numbuf, "%d", pk->pubkey_algo);
           result = numbuf;
         }
-      if (!strcmp (propname, "key_created"))
+      else if (!strcmp (propname, "key_created"))
         {
           snprintf (numbuf, sizeof numbuf, "%lu", (ulong)pk->timestamp);
           result = numbuf;

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

Summary of changes:
 g10/export.c | 4 ++--
 g10/getkey.c | 3 ++-
 g10/import.c | 2 +-
 g10/tofu.c   | 2 +-
 4 files changed, 6 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list