Home GnuPG
Diffusion GnuPG 403aa70c52e5

gpg: Return better error codes in case of a too short trustdb.

Description

gpg: Return better error codes in case of a too short trustdb.

* g10/tdbio.c (tdbio_read_record): Return GPG_ERR_EOF.
(tdbio_new_recnum): Never return on error.
(lookup_hashtable): Print a more descriptive error in case of !TABLE.

Also: tdbio_new_recnum had a bug in that it returned an error code and
not a record number in the error case. The function is expected to
always return a valid new record number.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Mar 26 2018, 5:43 PM
Parents
rG456a3a8e93ea: gpg: Fix trustdb updates without lock held.
Branches
Unknown
Tags
Unknown