aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jelen <[email protected]>2021-09-16 12:08:22 +0000
committerNIIBE Yutaka <[email protected]>2021-11-12 06:36:35 +0000
commitfae1d2e2ccde6cb46974433cf769c83134b0f57d (patch)
tree06d06b7a5e9709dd440c801144475cc4249de0e3
parentgpg: Avoid uninitialized revkey.fprlen. (diff)
downloadgnupg-fae1d2e2ccde6cb46974433cf769c83134b0f57d.tar.gz
gnupg-fae1d2e2ccde6cb46974433cf769c83134b0f57d.zip
kbx: Avoid use of uninitialized value.
* kbx/backend-kbx.c (be_kbx_search): Initialize skipped_long_blobs value which is passed to keybox_search and incremented there. (be_kbx_seek): Likewise. -- GnuPG-bug-id: 5393 Co-authored-by: NIIBE Yutaka <[email protected]> Signed-off-by: Jakub Jelen <[email protected]>
-rw-r--r--kbx/backend-kbx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kbx/backend-kbx.c b/kbx/backend-kbx.c
index eff64cfa3..7674cdf2c 100644
--- a/kbx/backend-kbx.c
+++ b/kbx/backend-kbx.c
@@ -247,7 +247,7 @@ be_kbx_search (ctrl_t ctrl, backend_handle_t backend_hd, db_request_t request,
gpg_error_t err;
db_request_part_t part;
size_t descindex;
- unsigned long skipped_long_blobs;
+ unsigned long skipped_long_blobs = 0;
log_assert (backend_hd && backend_hd->db_type == DB_TYPE_KBX);
log_assert (request);
@@ -302,7 +302,7 @@ be_kbx_seek (ctrl_t ctrl, backend_handle_t backend_hd,
gpg_error_t err;
db_request_part_t part;
size_t descindex;
- unsigned long skipped_long_blobs;
+ unsigned long skipped_long_blobs = 0;
KEYDB_SEARCH_DESC desc;
(void)ctrl;