diff options
author | Werner Koch <[email protected]> | 2019-09-30 12:08:13 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2019-09-30 12:08:13 +0000 |
commit | ec81c437e71b4c630a799ed29447cc5e3db162cd (patch) | |
tree | e5aa0afafbce4b5f3322b03f0c5c2d19820a28ea /g10/pkclist.c | |
parent | gpg: Fix a recently introduced printf format buglet. (diff) | |
download | gnupg-ec81c437e71b4c630a799ed29447cc5e3db162cd.tar.gz gnupg-ec81c437e71b4c630a799ed29447cc5e3db162cd.zip |
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.
Fixes-commit: e825aea2ba3529c333d7ec2c76e63998cb83d999
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/pkclist.c')
-rw-r--r-- | g10/pkclist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/pkclist.c b/g10/pkclist.c index 996b3ba6e..9ebfb131d 100644 --- a/g10/pkclist.c +++ b/g10/pkclist.c @@ -904,7 +904,7 @@ build_pk_list (ctrl_t ctrl, strlist_t rcpts, PK_LIST *ret_pk_list) /* Try to expand groups if any have been defined. */ if (opt.grouplist) - remusr = expand_group (rcpts); + remusr = expand_group (rcpts, 0); else remusr = rcpts; |