mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
gpg: Fix buglet in the check_all_keysigs function.
* g10/keyedit.c (sig_comparison): Actually compare the pubkey algorithms. -- This fixes two bugs: The first was a typo which led to us comparing A with A. The second problem was the use of an assert at a place where this can't be asserted: Two signature may have different algorithms; they won't verify but after all it is about corrupted signatures. Reported-by: Guilhem Moulin <guilhem@fripost.org> GnuPG-bug-id: 2236 Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
d33b35f748
commit
693838f012
@ -350,8 +350,9 @@ sig_comparison (const void *av, const void *bv)
|
||||
return 1;
|
||||
|
||||
ndataa = pubkey_get_nsig (a->pubkey_algo);
|
||||
ndatab = pubkey_get_nsig (a->pubkey_algo);
|
||||
log_assert (ndataa == ndatab);
|
||||
ndatab = pubkey_get_nsig (b->pubkey_algo);
|
||||
if (ndataa != ndatab)
|
||||
return (ndataa < ndatab)? -1 : 1;
|
||||
|
||||
for (i = 0; i < ndataa; i ++)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user