cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl library on linux

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 9 May 2002 15:33:05 +0200 (MET DST)

On Thu, 9 May 2002, Hisseine Dj. wrote:

> Thanks for your answer, I still have the same problem.

Ok, then let's try to narrow down the possibilities...

> Here are the informations that you request:
>
> -- Curl library version: 7.8

This is pretty old by now. I still don't think you should experience anything
like this on that version, but we've moved one quite far since 7.8 was
released.

> -- Call back function:
>
> struct MemoryStruct {
> char *memory;
> size_t size;
> };
>
> size_t
> WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data)
> {
> register int realsize = realsize * nmemb;

                            ^^^^^^

This looks like some major badness. I think that second word should be
'size' only...

> I will check for the protocol dump

Also, check that the MemoryStruct struct is inited to zero properly before
use.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
_______________________________________________________________
Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: bandwidth_at_sourceforge.net
Received on 2002-05-09