On Thu, Feb 09, 2012 at 10:05:11AM -0800, Rohan Desai wrote:
> I thought something like that. But after looking in the code it seems like it
> just assigns some curl_off_t variable the passed in value and later uses that
> variable to populate the content length. Shouldn't the internal curl_off_t get
> zeroed out regardless of whether the value passed to curl_easy_setopt is long
> or curl_off_t ? In other words, any insight into exactly why this is 
> happening?

The code calling curl_easy_setopt stores a long to the stack, which in
your case is 4 bytes. But libcurl extracts a curl_off_t from the stack,
which in your case is 8 bytes. Those extra 4 bytes are garbage--whatever
value happens to be on the stack in that location.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to