Diffusion GnuPG ec81c437e71b

gpg: Fix expand GPG groups when resolving a key

Authored by werner on Sep 30 2019, 2:08 PM.

Description

gpg: Fix expand GPG groups when resolving a key

* g10/expand-group.c (expand_group): Add arg prepend_input.
* g10/pkclist.c (build_pk_list): Adjust for it.
* g10/getkey.c (key_byname): Keep the expanded names in the CTX and
don't premature free them.
(get_pubkey_byname): Append the namelist to the extra_list.

The original patch didn't kept the expanded list in the context and
also would duplicate names which are not group names. The latter does
not really harm but the former lead to a use after free. Original
patch was applied just a few weeks ago.

Details

Committed
wernerSep 30 2019, 2:08 PM
Parents
rGb966a7c142ab: gpg: Fix a recently introduced printf format buglet.
Branches
Unknown
Tags
Unknown