chiark / gitweb /
gpg: Fix attempt to double free an UID structure.
authorWerner Koch <wk@gnupg.org>
Sun, 5 Mar 2017 22:24:15 +0000 (23:24 +0100)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 18 Sep 2017 20:41:12 +0000 (21:41 +0100)
commit9c88ac182dc88aea2f50b4acb90764ff0a111972
tree49f1e1fe7d240c900cdc58ea5dfa12b7b6d9dfb1
parent5e8abbced1992082f524382e20bdf6f95f026a23
gpg: Fix attempt to double free an UID structure.

* g10/getkey.c (get_best_pubkey_byname): Set released .UID to NULL.
--

Phil Pennock reported an assertion failure when doing

  % gpg --auto-key-locate dane --locate-keys someone
  gpg: Ohhhh jeeee: Assertion "uid->ref > 0" in \
         free_user_id failed (free-packet.c:310)

on his keyring.  This patch is not tested but a good guess.

Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit 4a130bbc2c2f4be6e8c6357512a943f435ade28f)

Gbp-Pq: Name 0048-gpg-Fix-attempt-to-double-free-an-UID-structure.patch
g10/getkey.c