Home GnuPG
Diffusion GnuPG 6496dc1f9d2a

gpg: Fix segv in get_best_pubkey_byname.

Description

gpg: Fix segv in get_best_pubkey_byname.

* g10/getkey.c (get_best_pubkey_byname): Init NEW.

We call free_user_id on NEW.uid and thus it needs to be initialized.

This fixes the ref-count or invisible segv bug from

  • GnuPG-bug-id: T3266
  • Signed-off-by: Werner Koch <wk@gnupg.org>