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