1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

gpg: Fix use of assert from commit dc417bf0.

* g10/keydb.c (keydb_update_keyblock): De-ref after the assert.  Use
%zu for size_t.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2015-12-23 15:16:02 +01:00
parent b0c9867fb7
commit ef7b7e9160
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -1386,12 +1386,13 @@ gpg_error_t
keydb_update_keyblock (KEYDB_HANDLE hd, kbnode_t kb)
{
gpg_error_t err;
PKT_public_key *pk = kb->pkt->pkt.public_key;
PKT_public_key *pk;
KEYDB_SEARCH_DESC desc;
size_t len;
assert (kb);
assert (kb->pkt->pkttype == PKT_PUBLIC_KEY);
pk = kb->pkt->pkt.public_key;
if (!hd)
return gpg_error (GPG_ERR_INV_ARG);
@ -1411,7 +1412,7 @@ keydb_update_keyblock (KEYDB_HANDLE hd, kbnode_t kb)
if (len == 20)
desc.mode = KEYDB_SEARCH_MODE_FPR20;
else
log_bug ("%s: Unsupported key length: %zd\n", __func__, len);
log_bug ("%s: Unsupported key length: %zu\n", __func__, len);
keydb_search_reset (hd);
err = keydb_search (hd, &desc, 1, NULL);