aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal H. Walfield <[email protected]>2015-11-17 11:56:55 +0000
committerNeal H. Walfield <[email protected]>2015-11-17 13:53:04 +0000
commit848726f5c02faddb0b0fd24ce1a66893f5325675 (patch)
tree6b2aefad7294a094328e0dd90ea86a758c939830
parentgpg: Correctly handle keyblocks followed by legacy keys. (diff)
downloadgnupg-848726f5c02faddb0b0fd24ce1a66893f5325675.tar.gz
gnupg-848726f5c02faddb0b0fd24ce1a66893f5325675.zip
gpg: Correctly handle an error.
* g10/keyring.c (keyring_search): If a compare function returns an error, treat it as an error. -- Signed-off-by: Neal H. Walfield <[email protected]>
-rw-r--r--g10/keyring.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/g10/keyring.c b/g10/keyring.c
index e9e3ffcd1..cd569fd56 100644
--- a/g10/keyring.c
+++ b/g10/keyring.c
@@ -1202,6 +1202,9 @@ keyring_search (KEYRING_HANDLE hd, KEYDB_SEARCH_DESC *desc,
free_packet (&pkt);
continue;
found:
+ if (rc)
+ goto real_found;
+
if (DBG_LOOKUP)
log_debug ("%s: packet starting at offset %zx matched descriptor %zd\n",
__func__, offset, n);