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

gpg: Fix iteration over signatures

* g10/keyedit.c (keyedit_quick_revsig): Take signature of correct node
--

GnuPG-bug-id: 5093
(cherry picked from commit db3854f55c91ca9c34cf6a306081c3709798db3d)
This commit is contained in:
Ingo Klöcker 2020-10-30 15:49:27 +01:00
parent ba321b60bc
commit 8a94142808

View File

@ -2888,7 +2888,7 @@ keyedit_quick_revsig (ctrl_t ctrl, const char *username, const char *sigtorev,
sigcount = 0; sigcount = 0;
for (n=node; n && n->pkt->pkttype == PKT_SIGNATURE; node=n, n=n->next) for (n=node; n && n->pkt->pkttype == PKT_SIGNATURE; node=n, n=n->next)
{ {
sig = node->pkt->pkt.signature; sig = n->pkt->pkt.signature;
if (!keyid_cmp (primarykid, sig->keyid)) if (!keyid_cmp (primarykid, sig->keyid))
continue; /* Ignore self-signatures. */ continue; /* Ignore self-signatures. */