Skip to content

Commit 8988a02

Browse files
authored
Merge pull request #9733 from tausbn/python-fix-bad-mro-flatten-list-join
Python: Fix bad join in MRO `flatten_list`
2 parents f122af8 + b98c482 commit 8988a02

File tree

1 file changed

+2
-2
lines changed
  • python/ql/lib/semmle/python/pointsto

1 file changed

+2
-2
lines changed

python/ql/lib/semmle/python/pointsto/MRO.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,10 @@ private class ClassListList extends TClassListList {
386386

387387
private ClassList flatten_list(ClassListList list, int n) {
388388
need_flattening(list) and
389-
exists(ClassList head, ClassListList tail | list = ConsList(head, tail) |
389+
exists(ClassList head, ClassListList tail | pragma[only_bind_out](list) = ConsList(head, tail) |
390390
n = head.length() and result = tail.flatten()
391391
or
392-
result = Cons(head.getItem(n), flatten_list(list, n + 1))
392+
result = Cons(head.getItem(n), flatten_list(pragma[only_bind_out](list), n + 1))
393393
)
394394
}
395395

0 commit comments

Comments
 (0)