[clang-tools-extra] [clang-tidy] New bugprone-unsafe-format-string check (PR #168691)
Daniel Krupp via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 25 08:07:29 PDT 2026
dkrupp wrote:
> > maybe bugprone-unbounded-format-string ?
>
> Sounds good to me
I can imagine a checker extension that checks if the destination buffer is larger than limiter size specified in the format string.
e.g.
```
char buffer[10]
scanf("%99s",buffer) //warn unsafe string
```
So for now I would leave the checker name as is (bugprone-unsafe-format-string) to allow extensibility for other cases.
@vbvictor, @zwuis What do you think?
https://github.com/llvm/llvm-project/pull/168691
More information about the cfe-commits
mailing list