News for hackers. Stuff that matters.
Re:Rust vs. C++ Formatting by syrrim on Tuesday January 17, 2023 @08:12AM (#34411965)
Everything has security implications in c, but printf isn't particularly bad. Common use of it involves a fixed format string specified at the call site. This prevents the most dangerous use of it (user specified format string) and also allows the compiler to detect when the format string doesn't correspond to the types of the arguments. Both these failures can be converted into compile time errors in common compilers. Printf, for all C's other faults, really isn't that bad.

There are no comments on this comment yet.