1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

gpg: Fix output in case of a corrupted trustdb.

* g10/tdbdump.c (list_trustdb): Add arg FP and change callers to pass
es_stdout.
* g10/tdbio.c (upd_hashtable): On a corrupted trustdb call
list_trustdb only in verbose > 1 mode and let it dump to stderr.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2015-06-04 17:34:33 +02:00
parent 840f807a90
commit bf06d04f53
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
4 changed files with 14 additions and 13 deletions

View file

@ -1132,7 +1132,8 @@ upd_hashtable (ulong table, byte *key, int keylen, ulong newrecnum)
{
log_error ("hashtbl %lu: %lu/%d points to an invalid record %lu\n",
table, hashrec, (msb % ITEMS_PER_HTBL_RECORD), item);
list_trustdb (NULL); /*FIXME: Bad - prints to stdout!!! */
if (opt.verbose > 1)
list_trustdb (es_stderr, NULL);
return GPG_ERR_TRUSTDB;
}
}