mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
JS: Fix bad join in CallGraphs.qll
This commit is contained in:
@@ -97,9 +97,14 @@ module CallGraph {
|
|||||||
not exists(read.getPropertyName()) and
|
not exists(read.getPropertyName()) and
|
||||||
result = read and
|
result = read and
|
||||||
// there exists only local reads of the object, nothing else.
|
// there exists only local reads of the object, nothing else.
|
||||||
forex(DataFlow::Node ref | ref = obj.getALocalUse() and exists(ref.asExpr()) |
|
objectOnlyUsedForPropRead(obj)
|
||||||
ref = [obj, any(DataFlow::PropRead r).getBase()]
|
)
|
||||||
)
|
}
|
||||||
|
|
||||||
|
pragma[nomagic]
|
||||||
|
private predicate objectOnlyUsedForPropRead(DataFlow::ObjectLiteralNode obj) {
|
||||||
|
forex(DataFlow::Node ref | ref = obj.getALocalUse() and exists(ref.asExpr()) |
|
||||||
|
ref = [obj, any(DataFlow::PropRead r).getBase()]
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user