[PATCH] Log client process name in winbindd
jra at samba.org
Thu Nov 8 23:52:36 UTC 2018
On Thu, Nov 08, 2018 at 08:03:30PM +0100, Andreas Schneider wrote:
> > EWRONGPATCH :-).
> Ups, sorry.
Can you add error return checks for all uses of
snprintf to check for truncated output please ?
Upon successful return, these functions return the number of characters printed (excluding the null byte used to end output to strings).
The functions snprintf() and vsnprintf() do not write more than size bytes (including the terminating null byte ('\0')). If the output was truncated due to this limit,
then the return value is the number of characters (excluding the terminating null byte) which would have been written to the final string if enough space had been avail‐
able. Thus, a return value of size or more means that the output was truncated. (See also below under NOTES.)
If an output error is encountered, a negative value is returned.
Now maybe the correct thing to do is
ignore the truncation, but we need to
at least acknowledge it in the source
(even if it's with some kind of an
More information about the samba-technical