aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2016-11-14 01:25:43 +0000
committerNIIBE Yutaka <[email protected]>2016-11-30 00:30:18 +0000
commit354f8119bc24c93b3ead367af7ded8dd271feb3c (patch)
treed73a0939952311e62dcc54c74fc8c00395f339aa
parentscd: minor cleanup to merge other works. (diff)
downloadgnupg-354f8119bc24c93b3ead367af7ded8dd271feb3c.tar.gz
gnupg-354f8119bc24c93b3ead367af7ded8dd271feb3c.zip
scd: Fix status info encoding.
* scd/command.c (send_status_info): Do percent plus encoding correctly. -- Backport of master commit: 4ee4d0b02172cf56d9582bb99e32a65c75315b25 Reported-by: David Härdeman <[email protected]> Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--scd/command.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/scd/command.c b/scd/command.c
index 963cb3e22..2c43a3a53 100644
--- a/scd/command.c
+++ b/scd/command.c
@@ -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;