C++: Repair for function call macros.

This commit is contained in:
Geoffrey White
2021-05-18 13:40:53 +01:00
parent 012840e602
commit c7382ee06d
3 changed files with 10 additions and 3 deletions

View File

@@ -79,7 +79,10 @@ class InsecureFunctionCall extends FunctionCall {
explain = "function call"
or
exists(MacroInvocation mi |
mi.getAnExpandedElement() = this.getAnArgument() and
(
mi.getAnExpandedElement() = this or
mi.getAnExpandedElement() = this.getAnArgument()
) and
mi.getMacro() = getAnInsecureEncryptionMacro() and
blame = mi and
explain = "macro invocation"
@@ -97,7 +100,10 @@ class InsecureFunctionCall extends FunctionCall {
getTarget() = getAdditionalEvidenceFunction()
or
exists(MacroInvocation mi |
mi.getAnExpandedElement() = this.getAnArgument() and
(
mi.getAnExpandedElement() = this or
mi.getAnExpandedElement() = this.getAnArgument()
) and
mi.getMacro() = getAdditionalEvidenceMacro()
)
or