mirror of git://git.gnupg.org/gnupg.git
gpg: Fix keyring retrieval.
* g10/keyring.c (keyring_get_keyblock): Avoid O(N^2) append.
--
Cherry-picking the master commit of:
a7a043e825
GnuPG-bug-id: 4592
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
d10bb027e4
commit
b7df72d307
|
@ -473,11 +473,14 @@ keyring_get_keyblock (KEYRING_HANDLE hd, KBNODE *ret_kb)
|
|||
}
|
||||
|
||||
in_cert = 1;
|
||||
node = lastnode = new_kbnode (pkt);
|
||||
node = new_kbnode (pkt);
|
||||
if (!keyblock)
|
||||
keyblock = node;
|
||||
keyblock = lastnode = node;
|
||||
else
|
||||
add_kbnode (keyblock, node);
|
||||
{
|
||||
lastnode->next = node;
|
||||
lastnode = node;
|
||||
}
|
||||
switch (pkt->pkttype)
|
||||
{
|
||||
case PKT_PUBLIC_KEY:
|
||||
|
|
Loading…
Reference in New Issue