cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_easy_escape() and curl_easy_unescape() length arguments data types

From: Yang Tse <yangsita_at_gmail.com>
Date: Tue, 15 Jan 2008 19:02:30 +0100

2008/1/15, Colin Hogben wrote:

> Would it not be better to add new API functions with the correct length
> types but different names, e.g. curl_easy_urlencode and curl_easy_urldecode.
> Just deprecate curl_easy_[un]escape. Then backward compatibility is not
> broken.

Yes that obviously solves the backward compatibility issue.

But even when internally calling the fixed function there would still
be an issue with 'compatible' curl_easy_unescape's outlength argument
when the length is bigger than what fits in an integer. Probably in
this case curl_easy_unescape() should return NULL and could be
interpreted as an out of memory condition.

-- 
-=[Yang]=-
Received on 2008-01-15