aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/escape.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/escape.c b/lib/escape.c
index a753697e5..140bd655e 100644
--- a/lib/escape.c
+++ b/lib/escape.c
@@ -45,6 +45,7 @@ char *curl_escape(char *string, int length)
int newlen = alloc;
int index=0;
+ length = alloc-1;
while(length--) {
in = *string;
if(' ' == in)