[libc-commits] [PATCH] D127517: [libc] add integer writing to printf

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Jun 10 13:00:13 PDT 2022

michaelrj added a comment.

While the idea of having a seperate "safe" version of printf is not inherently bad, it's already been tried to little success. In the standard right now is the definitions for the `_s` versions of printf functions. These have bounds checking and disable `%n`, but are also not widely used. Convincing developers to switch is hard, so my current plan is to use the compile-time switch I've added to disable `%n` by default in the existing printf functions. This provides the security enhancements by default for all of the people who don't care/didn't know that `%n` existed, while still allowing people to turn it back on if they are //really// sure they know what they're doing.

  rG LLVM Github Monorepo



More information about the libc-commits mailing list