================ @@ -0,0 +1,27 @@ +.. title:: clang-tidy - bugprone-sprintf-to-snprintf + +bugprone-sprintf-to-snprintf +============================ + +Finds calls to ``sprintf`` where the destination is a fixed-size character array and replaces them with the safer ``snprintf``. + +It's a common idiom to have a fixed-size buffer of characters allocated on the stack and then to ``printf`` into the buffer. This can easily lead to buffer overflows. This check recommends that the counted version of the function is used instead. ---------------- zeyi2 wrote:
We currently still maintain 80 chars limit in our documentation. Would you please reformat this? https://github.com/llvm/llvm-project/pull/182823 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
