Skip to content

Commit 93e8434

Browse files
committed
Ruby: fix content restriction in type trackers
1 parent f5f351e commit 93e8434

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

ruby/ql/lib/codeql/ruby/typetracking/TypeTracker.qll

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ private module Cached {
3030
// We can't rely on `basicStoreStep` since `startInContent` might be used with
3131
// a content that has no corresponding store.
3232
exists(TypeTrackerContent loadContents |
33-
basicLoadStep(_, _, loadContents) and
33+
(
34+
basicLoadStep(_, _, loadContents)
35+
or
36+
basicLoadStoreStep(_, _, loadContents, _)
37+
) and
3438
compatibleContents(content, loadContents)
3539
)
3640
}
@@ -42,7 +46,11 @@ private module Cached {
4246
or
4347
// As in MkTypeTracker, restrict `content` to those that might eventually match a store.
4448
exists(TypeTrackerContent storeContent |
45-
basicStoreStep(_, _, storeContent) and
49+
(
50+
basicStoreStep(_, _, storeContent)
51+
or
52+
basicLoadStoreStep(_, _, _, storeContent)
53+
) and
4654
compatibleContents(storeContent, content)
4755
)
4856
}

0 commit comments

Comments
 (0)