cURL / Mailing Lists / curl-library / Single Mail


Re: cURL bug -- Segmentation Fault when timeout is 1 second

From: Daniel Stenberg <>
Date: Wed, 4 Feb 2009 19:38:17 +0100 (CET)

On Wed, 4 Feb 2009, Daniel Marschall wrote:

PLEASE stop the top-posting as requested in the etiquette guidelines for this
mailing list:

> buffer = (char*)realloc(buffer, size * nmemb); // Extend the buffer

This doesn't extend the buffer, it resizes it to the size of the most recent

> // Append the data to the buffer
> strcat(buffer, data);

This assumes that the incoming data is zero-terminated, which is a bad

Received on 2009-02-04