cURL / Mailing Lists / curl-library / Single Mail


Re: Regarding Segmentation error when receiving data greater than 1000 bytes

From: Daniel Stenberg <>
Date: Mon, 23 Jan 2012 22:46:43 +0100 (CET)

On Mon, 23 Jan 2012, abhishek Kalapatapu wrote:

> I am using the getinmemory.c example to store the values received from a
> webservice. I see that whenever I receive more than 1000 bytes, I get a
> segmentation fault especially when my webserive is down and I get HTTP 404
> error.
> Any thoughts why it must be happening.

There's nothing in the code that has any limit or border at 1000 bytes so
there's really no explanation to me. Also, that's a really old example that
might be one of our most frequently used and discussed why I simply don't
believe it has such a fatal flaw.

I think you have made a mistake somewhere in your code.

List admin:
Received on 2012-01-23