We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent df4b596 commit ed44358Copy full SHA for ed44358
1 file changed
javascript/ql/test/library-tests/TaintTracking/array-mutation.js
@@ -38,4 +38,29 @@ function test(x, y) {
38
let j = [];
39
j[j.length] = source();
40
sink(j); // NOT OK
41
+
42
+ let k = [];
43
+ let kSpliced = k.toSpliced(x, y, source());
44
+ sink(k); // OK
45
+ sink(kSpliced); // NOT OK -- This should be caught, but it is not
46
47
+ let l = [];
48
+ l = l.toSpliced(x, y, source());
49
+ sink(l); // NOT OK -- This should be caught, but it is not
50
51
+ let m = [];
52
+ m = m.toSpliced(q, source(), y);
53
+ sink(m); // OK
54
55
+ let n = [];
56
+ n = n.toSpliced(source(), x);
57
+ sink(n); // OK
58
59
+ let o = [];
60
+ o = o.toSpliced(x, source());
61
+ sink(o); // OK
62
63
+ let p = [];
64
+ p = p.toSpliced(source(), x, y);
65
+ sink(p); // OK
66
}
0 commit comments