njames93 added a comment. Why are we only targeting sprintf, vsprintf would also suffer from the same pitfalls. Is there any hard reason that this check always suggests `snprintf` instead of `sprintf_s`, maybe have that dynamically controlled with an option.
================ Comment at: clang-tools-extra/clang-tidy/bugprone/SprintfWithFixedSizeBufferCheck.cpp:36 + + std::string ReplacementText = "snprintf("; + auto arg = Call->getArgs(); ---------------- Prefer small little edits instead of one big replacement. So create a fix it that turns `sprintf` into `snprintf`, then create a fix it that inserts `, sizeof(Buff)` after the first argument. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132294/new/ https://reviews.llvm.org/D132294 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits