aboutsummaryrefslogtreecommitdiffstats
path: root/scd/command.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2016-11-14 01:25:43 +0000
committerNIIBE Yutaka <[email protected]>2016-11-14 01:25:43 +0000
commit4ee4d0b02172cf56d9582bb99e32a65c75315b25 (patch)
tree31f169eee6a4fa692440186c6bc4ca28713e0eac /scd/command.c
parentagent: Improve concurrency when Libgcrypt 1.8 is used. (diff)
downloadgnupg-4ee4d0b02172cf56d9582bb99e32a65c75315b25.tar.gz
gnupg-4ee4d0b02172cf56d9582bb99e32a65c75315b25.zip
scd: Fix status info encoding.
* scd/command.c (send_status_info): Do percent plus encoding correctly. -- Reported-by: David Härdeman <[email protected]> Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'scd/command.c')
-rw-r--r--scd/command.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/scd/command.c b/scd/command.c
index 358459364..e771a745b 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -2137,7 +2137,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;