C++: Ignore gets'es with incorrect parameter counts

This commit is contained in:
Jeroen Ketema
2024-06-04 11:13:10 +02:00
parent a83d50062e
commit 66077dc38d
3 changed files with 10 additions and 2 deletions

View File

@@ -17,5 +17,6 @@ import cpp
from FunctionCall call, Function target
where
call.getTarget() = target and
target.hasGlobalOrStdName("gets")
target.hasGlobalOrStdName("gets") and
target.getNumberOfParameters() = 1
select call, "'gets' does not guard against buffer overflow."