[Pkg-gnupg-commit] [gnupg2] 25/180: g10: Fix iteration over getkey results.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Sat Dec 24 22:29:04 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit 4db9a425644dccaf81b51ebc97b32a9cc21941a4
Author: Justus Winter <justus at g10code.com>
Date:   Mon Nov 28 13:36:56 2016 +0100

    g10: Fix iteration over getkey results.
    
    * g10/getkey.c (getkey_next): Only ask 'lookup' for the exact match if
    our caller requested the key.  Fixes a crash in 'lookup'.
    
    GnuPG-bug-id: 2848
    Fixes-commit: 1d03cc77e1706f7da653153ad4b58c61e4fd2573
    Signed-off-by: Justus Winter <justus at g10code.com>
---
 g10/getkey.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/g10/getkey.c b/g10/getkey.c
index 68e6a1b..6eec087 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -2178,7 +2178,7 @@ getkey_next (getkey_ctx_t ctx, PKT_public_key *pk, kbnode_t *ret_keyblock)
   if (pk && ret_keyblock == NULL)
       ret_keyblock = &keyblock;
 
-  rc = lookup (ctx, ret_keyblock, &found_key, ctx->want_secret);
+  rc = lookup (ctx, ret_keyblock, pk ? &found_key : NULL, ctx->want_secret);
   if (!rc && pk)
     {
       log_assert (found_key);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list