mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
CPP: Bypass some of the complexity in 'toString'.
This commit is contained in:
@@ -19,18 +19,12 @@ abstract class SensitiveExpr extends Expr { }
|
||||
|
||||
class SensitiveVarAccess extends SensitiveExpr {
|
||||
SensitiveVarAccess() {
|
||||
this instanceof VariableAccess and
|
||||
exists(string s | this.toString().toLowerCase() = s |
|
||||
suspicious(s)
|
||||
)
|
||||
suspicious(this.(VariableAccess).getTarget().getName().toLowerCase())
|
||||
}
|
||||
}
|
||||
|
||||
class SensitiveCall extends SensitiveExpr {
|
||||
SensitiveCall() {
|
||||
this instanceof FunctionCall and
|
||||
exists(string s | this.toString().toLowerCase() = s |
|
||||
suspicious(s)
|
||||
)
|
||||
suspicious(this.(FunctionCall).getTarget().getName().toLowerCase())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user