mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +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
|
||||
result = read and
|
||||
// there exists only local reads of the object, nothing else.
|
||||
forex(DataFlow::Node ref | ref = obj.getALocalUse() and exists(ref.asExpr()) |
|
||||
ref = [obj, any(DataFlow::PropRead r).getBase()]
|
||||
)
|
||||
objectOnlyUsedForPropRead(obj)
|
||||
)
|
||||
}
|
||||
|
||||
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