cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curlpp mailing list Archives

[cURLpp] Re: [curlpp-library] Failed to pass curl_off_t-type parameter properly

From: Jean-Philippe Barrette-LaPierre <jpb_at_rrette.com>
Date: Thu, 25 Aug 2005 18:54:17 -0400

On Wednesday 17 August 2005 10:02, Vitaly Dolya wrote:
> Hi everybody!
>
> I've ran into the problem, that i cann't pass curl_off_t-type parameter
> to libcurl-labrary properly,

[snip]

> I've dug a little deeper into libcurl- and curlpp-sources and found the
> cause of the problem, in a OptionSetter.inl file:
>
> -- cut --
> template< typename OptionValueType,
> š š š cURL::CURLoption optionType >
> void
> cURLpp::OptionSetter< OptionValueType,
> š š š š š š š optionType >::setOpt(cURLpp::CurlHandle *handle,
> š š š š š š š š š š š šParamType value)
> {
> š šhandle->option(optionType, (void *)value);
> }
> -- cut --
>
> As You may noticed, before to be passed to libcurl-labrary the value is
> casted to (void*) type here.
> I developing for 32-bit platform; environment is WindowsXP/MSVS2003.
> curl_off_t type is 64-bit value here, but (void*) is 32-bit one. Such
> type cast goes with a loss of data
> in my case. Truncated 32-bit value will be pushed into the stack, but
> further libcurl will try to extract it as 64-bit
> one, that is wrong.

Yep, it is wrong.

> Any advise or ideas are appreciated.
> I believe it is a bug in curlpp-library.
>

It is. The next version will not cast the value.

> best regards

Thanks!

-- 
Jean-Philippe Barrette-LaPierre
cURLpp maintener (http://rrette.com/curlpp.html)
_______________________________________________
cURLpp mailing list
cURLpp_at_rrette.com
http://www.rrette.com/mailman/listinfo/curlpp
Received on 2005-08-26

These mail archives are generated by hypermail.

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

File upload with ASP.NET