================
@@ -369,6 +380,9 @@ ProgramStateRef
UnixAPIMisuseChecker::EnsureGetdelimBufferAndSizeCorrect(
void UnixAPIMisuseChecker::CheckGetDelim(CheckerContext &C,
const CallEvent &Call) const {
+ if (Call.getNumArgs() < 2)
+ return;
----------------
vbvictor wrote:
`CheckGetDelim` process both `getline` and `getdelim` functions, so the
condition must be
`!= 3 || != 4`.
As for now, I go for "if it doesn't crush, let it work", thus test case
`TEST_GETLINE_2` works even with no 3rd parameter provided.
I can make this condition more strict.
https://github.com/llvm/llvm-project/pull/145229
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits