mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
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: e825aea2ba
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
b966a7c142
commit
ec81c437e7
4 changed files with 55 additions and 33 deletions
|
@ -267,7 +267,7 @@ int check_signatures_trust (ctrl_t ctrl, PKT_signature *sig);
|
|||
|
||||
void release_pk_list (PK_LIST pk_list);
|
||||
int expand_id (const char *id, strlist_t *into, unsigned int flags);
|
||||
strlist_t expand_group (strlist_t input);
|
||||
strlist_t expand_group (strlist_t input, int prepend_input);
|
||||
int build_pk_list (ctrl_t ctrl, strlist_t rcpts, PK_LIST *ret_pk_list);
|
||||
gpg_error_t find_and_check_key (ctrl_t ctrl,
|
||||
const char *name, unsigned int use,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue