aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/ChangeLog4
-rw-r--r--common/simple-pwquery.c12
2 files changed, 11 insertions, 5 deletions
diff --git a/common/ChangeLog b/common/ChangeLog
index e82e5b774..8e81baa0c 100644
--- a/common/ChangeLog
+++ b/common/ChangeLog
@@ -1,3 +1,7 @@
+2004-04-13 Werner Koch <[email protected]>
+
+ * simple-pwquery.c (copy_and_escape): Relaxed quoting.
+
2004-04-05 Werner Koch <[email protected]>
* errors.h (STATUS_NEWSIG): New.
diff --git a/common/simple-pwquery.c b/common/simple-pwquery.c
index 50dabc218..36244b120 100644
--- a/common/simple-pwquery.c
+++ b/common/simple-pwquery.c
@@ -357,19 +357,21 @@ static char *
copy_and_escape (char *buffer, const char *text)
{
int i;
+ const unsigned char *s = text;
char *p = buffer;
+
- for (i=0; text[i]; i++)
+ for (i=0; s[i]; i++)
{
- if (text[i] < ' ' || text[i] == '+')
+ if (s[i] < ' ' || s[i] == '+')
{
- sprintf (p, "%%%02X", text[i]);
+ sprintf (p, "%%%02X", s[i]);
p += 3;
}
- else if (text[i] == ' ')
+ else if (s[i] == ' ')
*p++ = '+';
else
- *p++ = text[i];
+ *p++ = s[i];
}
return p;
}