mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Python: Fix points-to regressions Test.ql
Only being able to debug missing pointsTo for NameNode was quite limiting ...
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import python
|
||||
|
||||
from NameNode name, CallNode call, string debug
|
||||
from ControlFlowNode arg, CallNode call, string debug
|
||||
where
|
||||
call.getAnArg() = name and
|
||||
call.getAnArg() = arg and
|
||||
call.getFunction().(NameNode).getId() = "check" and
|
||||
if exists(name.pointsTo())
|
||||
then debug = name.pointsTo().toString()
|
||||
if exists(arg.pointsTo())
|
||||
then debug = arg.pointsTo().toString()
|
||||
else debug = "<MISSING pointsTo()>"
|
||||
select name, debug
|
||||
select arg, debug
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import python
|
||||
|
||||
from NameNode name, CallNode call, string debug
|
||||
from ControlFlowNode arg, CallNode call, string debug
|
||||
where
|
||||
call.getAnArg() = name and
|
||||
call.getAnArg() = arg and
|
||||
call.getFunction().(NameNode).getId() = "check" and
|
||||
if exists(name.pointsTo())
|
||||
then debug = name.pointsTo().toString()
|
||||
if exists(arg.pointsTo())
|
||||
then debug = arg.pointsTo().toString()
|
||||
else debug = "<MISSING pointsTo()>"
|
||||
select name, debug
|
||||
select arg, debug
|
||||
|
||||
Reference in New Issue
Block a user