[clang] [Clang][Sema] Add fortify warnings for fread, fwrite, and fgets (PR #204337)
Venkatesh Srinivasan via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 27 12:48:07 PDT 2026
Radovan =?utf-8?q?Bo=C5=BEi=C4=87?= <radovan.bozic at htecgroup.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/204337 at github.com>
================
@@ -1002,6 +1002,11 @@ def warn_fortify_scanf_overflow : Warning<
"%2, but the corresponding specifier may require size %3">,
InGroup<FortifySource>;
+def warn_fortify_source_overread : Warning<
+ "'%0' will always read past the source buffer; source buffer has "
----------------
venk-ks wrote:
"... past the end of the source buffer;" makes it clearer
https://github.com/llvm/llvm-project/pull/204337
More information about the cfe-commits
mailing list