fix that the TypeTracker was unrestricted for the base-case of nonFirstLocationType

This commit is contained in:
erik-krogh
2023-01-02 10:04:07 +01:00
committed by Tony Torralba
parent e02b67af63
commit 5c388c554c
3 changed files with 16 additions and 2 deletions

View File

@@ -465,7 +465,11 @@ module DOM {
*/
private DataFlow::SourceNode nonFirstLocationType(DataFlow::TypeTracker t) {
// One step inlined in the beginning.
result = any(DataFlow::Node n | n.hasUnderlyingType("Location")).getALocalSource().track(_, t)
exists(DataFlow::TypeTracker t2 |
result =
any(DataFlow::Node n | n.hasUnderlyingType("Location")).getALocalSource().track(t2, t) and
t2.start()
)
or
exists(DataFlow::TypeTracker t2 | result = nonFirstLocationType(t2).track(t2, t))
}