diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-09-30 22:40:24 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-09-30 22:40:24 +0000 |
commit | ec08e2f9f24da5974be1ab222c5703fd9fb3722f (patch) | |
tree | efe5f2f8496623b8bdce46f3d4103a246de2aaba /lib | |
parent | 38dd0ede9ddcf7491792e7edd98665841667ae67 (diff) |
Alex Fishman reported a curl_easy_escape() problem that was made the
function do wrong on all input bytes that are >= 0x80 (decimal 128) due to a
signed / unsigned mistake in the code. I fixed it and added test case 543 to
verify.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/escape.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/escape.c b/lib/escape.c index fd08451de..ec9883f11 100644 --- a/lib/escape.c +++ b/lib/escape.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -59,7 +59,7 @@ char *curl_easy_escape(CURL *handle, const char *string, int inlength) size_t alloc = (inlength?(size_t)inlength:strlen(string))+1; char *ns; char *testing_ptr = NULL; - char in; + unsigned char in; /* we need to treat the characters unsigned */ size_t newlen = alloc; int strindex=0; size_t length; |