cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1810446 ] Bad escaping: wrong assumption that char is unsigned

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Tue, 09 Oct 2007 15:17:04 -0700

Bugs item #1810446, was opened at 2007-10-10 02:14
Message generated for change (Settings changed) made by orivej
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1810446&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: wrong behaviour
Status: Open
Resolution: None
>Priority: 9
Private: No
Submitted By: Orivej Desh (orivej)
Assigned to: Daniel Stenberg (bagder)
Summary: Bad escaping: wrong assumption that char is unsigned

Initial Comment:
curl_easy_escape compiled with recent gcc (4.2.1 built by ArchLinux) works wrong: it replaces all upper half characters with '%FF'.

In curl-7.17.0/lib/escape.c curl_easy_escape on line 123 (snprintf(&ns[strindex], 4, "%%%02X", in);) assumes that char (in) is unsigned. This assumption is wrong.

The simplest patch is to replace 'char in;' with 'unsigned char in;' on line 62.

How to apply attached patch:
cd curl-7.17.0
patch -p1 -i ../signedchar.patch

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1810446&group_id=976
Received on 2007-10-10

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET