cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Bogus --libcurl output

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 20 Apr 2009 01:10:31 +0200 (CEST)

On Sun, 19 Apr 2009, Gisle Vanem wrote:

>> I think the only really decent way is to make a new my_setopt_str()
>> function that would be used when a string is set as opposed to just some
>> object pointer. Then _my_setopt() wouldn't have to guess!
>
> I was thinking about testing if the data was writeable or not. Strings (at
> least on Windows) comes from the read-only '.rdata' sections in the
> data-segment. Can easily be tested with IsBadWritePtr(). On other platforms
> there should (?) be a similar heuristics we can use. Or maybe the idea is
> not worth following?

That could work for some systems, but as it would require specific checks for
so many different architectures I think it is better to instead add my new
function approach instead.

Like the attached patch. You like?

-- 
  / daniel.haxx.se


-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2009-04-20