mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
agent: Avoid appending a '\0' byte to the response of READKEY
* agent/command.c (cmd_readkey): Set pkbuflen to the length of the output without an extra '\0' byte.
This commit is contained in:
parent
80719612b7
commit
df97fe2480
@ -1031,7 +1031,8 @@ cmd_readkey (assuan_context_t ctx, char *line)
|
||||
rc = gpg_error_from_syserror ();
|
||||
else
|
||||
{
|
||||
gcry_sexp_sprint (s_pkey, GCRYSEXP_FMT_CANON, pkbuf, pkbuflen);
|
||||
pkbuflen = gcry_sexp_sprint (s_pkey, GCRYSEXP_FMT_CANON,
|
||||
pkbuf, pkbuflen);
|
||||
rc = assuan_send_data (ctx, pkbuf, pkbuflen);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user