[PATCH] D150430: Implement BufferOverlap check for sprint/snprintf
Arnaud Bienner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 12 13:01:43 PDT 2023
ArnaudBienner added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp:2385
+ // sprintf(char *buffer, const char* format, ... /* format arguments */);
+ unsigned int format_arguments_start_idx = 3;
+ // snprintf case: one extra extra arguments for size
----------------
Just realized this should be 2 (position 3, but index 2).
Will upload a newer version of the patch with this change, and new tests
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150430/new/
https://reviews.llvm.org/D150430
More information about the cfe-commits
mailing list