mirror of
https://github.com/github/codeql.git
synced 2026-05-01 11:45:14 +02:00
implemented pr fixes
This commit is contained in:
@@ -15,9 +15,5 @@ import semmle.code.cpp.commons.Scanf
|
||||
from FunctionCall call, ScanfFunction sff
|
||||
where
|
||||
call.getTarget() = sff and
|
||||
(
|
||||
call.getArgument(sff.getFormatParameterIndex()).toString().regexpMatch(".*%s.*")
|
||||
or
|
||||
call.getArgument(sff.getFormatParameterIndex()).toString() = (".*%ls.*")
|
||||
)
|
||||
call.getArgument(sff.getFormatParameterIndex()).getValue().regexpMatch(".*%l?s.*")
|
||||
select call, "Dangerous use of one of the scanf functions"
|
||||
|
||||
Reference in New Issue
Block a user