1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-17 00:39:50 +02:00

scd: Fix status info encoding.

* scd/command.c (send_status_info): Do percent plus encoding correctly.

--

Reported-by: David Härdeman <david@hardeman.nu>
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2016-11-14 10:25:43 +09:00
parent 6bf6981972
commit 4ee4d0b021

View File

@ -2137,7 +2137,8 @@ send_status_info (ctrl_t ctrl, const char *keyword, ...)
} }
for ( ; valuelen && n < DIM (buf)-2; n++, valuelen--, value++) for ( ; valuelen && n < DIM (buf)-2; n++, valuelen--, value++)
{ {
if (*value < ' ' || *value == '+') if (*value == '+' || *value == '\"' || *value == '%'
|| *value < ' ')
{ {
sprintf (p, "%%%02X", *value); sprintf (p, "%%%02X", *value);
p += 3; p += 3;