gpg: Correctly handle an error.
authorNeal H. Walfield <neal@g10code.com>
Tue, 17 Nov 2015 11:56:55 +0000 (12:56 +0100)
committerNeal H. Walfield <neal@g10code.com>
Tue, 17 Nov 2015 13:53:04 +0000 (14:53 +0100)
* g10/keyring.c (keyring_search): If a compare function returns an
error, treat it as an error.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>
g10/keyring.c

index e9e3ffc..cd569fd 100644 (file)
@@ -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);