gpg: Import only packets which are allowed in a keyblock.
authorWerner Koch <wk@gnupg.org>
Thu, 20 Dec 2012 08:43:41 +0000 (09:43 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 20 Dec 2012 10:52:04 +0000 (11:52 +0100)
commit498882296ffac7987c644aaf2a0aa108a2925471
treef5651078828b2abe103a0db0a922539111a83311
parent20c95ef258f8520283406239f7c6f4729341d463
gpg: Import only packets which are allowed in a keyblock.

* g10/import.c (valid_keyblock_packet): New.
(read_block): Store only valid packets.
--

A corrupted key, which for example included a mangled public key
encrypted packet, used to corrupt the keyring.  This change skips all
packets which are not allowed in a keyblock.

GnuPG-bug-id: 1455

(cherry-picked from commit 3a4b96e665fa639772854058737ee3d54ba0694e)
g10/import.c