mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-10 21:38:50 +01:00
agent: Fix KEYTOCARD for the use case with loopback pinentry.
* agent/command.c (cmd_keytocard): Copy LINE. -- GnuPG-bug-id: 7283 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
05be36720d
commit
4a4c1efac5
@ -3291,6 +3291,12 @@ cmd_keytocard (assuan_context_t ctx, char *line)
|
|||||||
force = has_option (line, "--force");
|
force = has_option (line, "--force");
|
||||||
line = skip_options (line);
|
line = skip_options (line);
|
||||||
|
|
||||||
|
/* Need a copy of LINE, since it might inquire to the frontend which
|
||||||
|
resulted original buffer overwritten. */
|
||||||
|
line = xtrystrdup (line);
|
||||||
|
if (!line)
|
||||||
|
return gpg_error_from_syserror ();
|
||||||
|
|
||||||
argc = split_fields (line, argv, DIM (argv));
|
argc = split_fields (line, argv, DIM (argv));
|
||||||
if (argc < 3)
|
if (argc < 3)
|
||||||
{
|
{
|
||||||
@ -3410,6 +3416,7 @@ cmd_keytocard (assuan_context_t ctx, char *line)
|
|||||||
xfree (keydata);
|
xfree (keydata);
|
||||||
|
|
||||||
leave:
|
leave:
|
||||||
|
xfree (line);
|
||||||
xfree (ecdh_params);
|
xfree (ecdh_params);
|
||||||
gcry_sexp_release (s_skey);
|
gcry_sexp_release (s_skey);
|
||||||
xfree (shadow_info);
|
xfree (shadow_info);
|
||||||
|
Loading…
Reference in New Issue
Block a user