diff --git a/4_memcpy_definitions.ql b/4_memcpy_definitions.ql index 8b13789..86923a8 100644 --- a/4_memcpy_definitions.ql +++ b/4_memcpy_definitions.ql @@ -1 +1,5 @@ +import cpp +from Function func +where func.getName() = "memcpy" +select func diff --git a/5_macro_definitions.ql b/5_macro_definitions.ql index 139597f..6585a8d 100644 --- a/5_macro_definitions.ql +++ b/5_macro_definitions.ql @@ -1,2 +1,5 @@ +import cpp - +from Macro macro +where macro.getName() in ["ntohs", "ntohl", "ntohll"] +select macro diff --git a/6_memcpy_calls.ql b/6_memcpy_calls.ql index 8b13789..614906a 100644 --- a/6_memcpy_calls.ql +++ b/6_memcpy_calls.ql @@ -1 +1,5 @@ +import cpp +from FunctionCall call +where call.getTarget().getName() = "memcpy" +select call diff --git a/7_macro_invocations.ql b/7_macro_invocations.ql index 8b13789..838581a 100644 --- a/7_macro_invocations.ql +++ b/7_macro_invocations.ql @@ -1 +1,5 @@ +import cpp +from MacroInvocation invocation +where invocation.getMacroName() in ["ntohs", "ntohl", "ntohll"] +select invocation diff --git a/8_macro_expressions.ql b/8_macro_expressions.ql index 8b13789..14f9628 100644 --- a/8_macro_expressions.ql +++ b/8_macro_expressions.ql @@ -1 +1,6 @@ +import cpp + +from MacroInvocation invocation +where invocation.getMacroName() in ["ntohs", "ntohl", "ntohll"] +select invocation.getExpr()