[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] Can I get the entire MHD log without depends on C fu
From: |
Christian Grothoff |
Subject: |
Re: [libmicrohttpd] Can I get the entire MHD log without depends on C function like sprintf()? |
Date: |
Mon, 29 Feb 2016 22:04:00 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 |
For the log messages, 1024 bytes seems reasonable, as long as you use
the 'n'-variants and don't overflow if we happen to get some unexpectely
long user-input.
On 02/29/2016 07:09 PM, silvioprog wrote:
> I still have a doubt, on Windows I can use the _vscprintf function to
> calculate the size of the buffer, but Linux doesn't have this function, and
> I can't use vsnprintf(NULL, 0, fmt, args) on Pascal because it frees the
> arguments, so is the 1024 a good buffer size when you can't calculate it
> automatically? If so, I'll start loading the buffer with size 1024 and
> re-set it to the _vsnprintf_s result length at the end.
signature.asc
Description: OpenPGP digital signature