cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Bogus --libcurl output

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Sun, 19 Apr 2009 10:30:50 +0200

"Daniel Stenberg" <daniel_at_haxx.se> wrote:

>> I think I see why in _my_setopt(); the use of ISGRAPH() seems a bit weak.
>> But what to do about it?
>
> 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?

--gv
-------------------------------------------------------------------
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-19