aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2015-05-11 17:38:07 +0000
committerWerner Koch <[email protected]>2015-05-11 17:40:19 +0000
commitbe136273454532d94a955fbbcfa1544b47cad954 (patch)
tree8ccca37b601a573c42cfaf21ffde3780859e15fc
parentscd: PC/SC reader selection by partial string match. (diff)
downloadgnupg-be136273454532d94a955fbbcfa1544b47cad954.tar.gz
gnupg-be136273454532d94a955fbbcfa1544b47cad954.zip
gpg-connect-agent: Fix quoting of internal percent+ function.
* tools/gpg-connect-agent.c (get_var_ext) <percent, percent+): Also escape '+'. -- GnuPG-bug-id: 1841 Signed-off-by: Werner Koch <[email protected]>
-rw-r--r--tools/gpg-connect-agent.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/gpg-connect-agent.c b/tools/gpg-connect-agent.c
index 4acda0171..142bd30fd 100644
--- a/tools/gpg-connect-agent.c
+++ b/tools/gpg-connect-agent.c
@@ -499,8 +499,8 @@ arithmetic_op (int operator, const char *operands)
percent ARGS
percent+ ARGS
Escape the args using the percent style. Tabs, formfeeds,
- linefeeds and carriage returns are also escaped.
- "percent+" also maps spaces to plus characters.
+ linefeeds, carriage return, and the plus sign are also
+ escaped. "percent+" also maps spaces to plus characters.
errcode ARG
Assuming ARG is an integer, return the gpg-error code.
@@ -592,12 +592,12 @@ get_var_ext (const char *name)
else if ( (s - name) == 7 && !strncmp (name, "percent", 7))
{
s++;
- result = percent_escape (s, "\t\r\n\f\v");
+ result = percent_escape (s, "+\t\r\n\f\v");
}
else if ( (s - name) == 8 && !strncmp (name, "percent+", 8))
{
s++;
- result = percent_escape (s, "\t\r\n\f\v");
+ result = percent_escape (s, "+\t\r\n\f\v");
for (p=result; *p; p++)
if (*p == ' ')
*p = '+';