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-1766320 ] Some LONG options using va_arg with int

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Thu, 02 Aug 2007 09:39:42 -0700

Bugs item #1766320, was opened at 2007-08-02 12:39
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1766320&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: portability problem
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Scott Cantor (scantor)
Assigned to: Daniel Stenberg (bagder)
Summary: Some LONG options using va_arg with int

Initial Comment:
I noticed a possible 64-bit bug in libcurl in some of the option setting code where it calls va_arg with "int" as the type of the parameter to pull off the stack. See examples like CURLOPT_DNS_CACHE_TIMEOUT and, CURLOPT_DNS_USE_GLOBAL_CACHE.

This probably works fine until you hit a 64-bit platform where sizeof(long) != sizeof(int). The libcurl docs say that all the "integral" options that aren't large offsets take a long parameter, so if I pass in a long, the code really needs to read a long off the stack, not an int.

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

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

These mail archives are generated by hypermail.

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

File upload with ASP.NET