News for hackers. Stuff that matters.
Re:Making C Less Dangerous in the Linux Kernel [video] by Taniwha on Sunday January 27, 2019 @06:10PM (#19014343)
yes - snprintf() returns the length of the string that would be written even if it wasn't clipped to the length of the output buffer - if you want to accumulate strings into a buffer using the output length to update the offset/size bad things will happen.

scnprintf() returns the actual number of bytes written (less the null)

There are no comments on this comment yet.