News for hackers. Stuff that matters.
Re:Banned C standard library functions in Git source code by masklinn on Monday August 26, 2019 @03:39AM (#20798077)
The original commits mentions git's strbuf API[0] and its xsnprintf, a variant of snprintf which asserts that the destination buffer was big enough[1] (rather than just return truncation information).

For other codebases, snprintf is the usual recommendation, and careful straight buffer manipulation (mem*) iff performances are a concern.

[0] https://schacon.github.io/git/technical/api-strbuf.html

[1] https://code.forksand.com/linux/git_git/commit/7b03c89ebd103...

There are no comments on this comment yet.