]> git.ipfire.org Git - thirdparty/shadow.git/commit
Add stpeprintf()
authorAlejandro Colomar <alx@kernel.org>
Sun, 29 Jan 2023 23:19:56 +0000 (00:19 +0100)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Thu, 16 Feb 2023 10:29:33 +0000 (11:29 +0100)
commit7e213cfb50e9db6838bf6f27867ed3ab5af67529
tree30a81dc87145a4f94505082716781fc0ed95853e
parenta187ad8e9e790161a6b2f8982b61b938b6b3438b
Add stpeprintf()

[v]stpeprintf() are similar to [v]snprintf(3), but they allow chaining.
[v]snprintf(3) are very dangerous for catenating strings, since the
obvious ways to do it invoke Undefined Behavior, and the ways that avoid
UB are very error-prone.

Cc: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
configure.ac
lib/stpeprintf.h [new file with mode: 0644]
libmisc/Makefile.am
libmisc/stpeprintf.c [new file with mode: 0644]