mirror of git://git.gnupg.org/gnupg.git
scd: Fix status info encoding.
* scd/command.c (send_status_info): Do percent plus encoding correctly.
--
Backport of master commit: 4ee4d0b021
Reported-by: David Härdeman <david@hardeman.nu>
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
88556386a6
commit
354f8119bc
|
@ -2103,7 +2103,8 @@ send_status_info (ctrl_t ctrl, const char *keyword, ...)
|
|||
}
|
||||
for ( ; valuelen && n < DIM (buf)-2; n++, valuelen--, value++)
|
||||
{
|
||||
if (*value < ' ' || *value == '+')
|
||||
if (*value == '+' || *value == '\"' || *value == '%'
|
||||
|| *value < ' ')
|
||||
{
|
||||
sprintf (p, "%%%02X", *value);
|
||||
p += 3;
|
||||
|
|
Loading…
Reference in New Issue