curl-library
Re: Problem caused by CURLDEBUG
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 23 Oct 2006 08:34:32 +0200 (CEST)
Date: Mon, 23 Oct 2006 08:34:32 +0200 (CEST)
On Sun, 22 Oct 2006, James Housley wrote:
>>> asprintf(&str, "A simple print\n");
>>
>> Yes sure, but you should never call this function from within libcurl.
>
> Why not? That is a great function, since you can't ever get a buffer
> overrun.
Yes sure, but 1) it is not portable and 2) we provide our own internal
replacement version of it.
But thinking about it, you would get the internal replacement if you used that
code and thus it should work fine (since curl/curl.h includes curl/mprintf.h
that define replacement macros for the common *printf functions). It's just
that our version returns the new pointer and does not set it in the first
argument...
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2006-10-23