Skip to content

Commit 9388226

Browse files
committed
Added test case for Uint8Array and TypedArray.prototype.buffer
1 parent a885e61 commit 9388226

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

javascript/ql/test/library-tests/TaintTracking/BasicTaintTracking.expected

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ consistencyIssue
4040
| nested-props.js:20 | expected an alert, but found none | NOT OK - but not found | Consistency |
4141
| stringification-read-steps.js:17 | expected an alert, but found none | NOT OK | Consistency |
4242
| stringification-read-steps.js:25 | expected an alert, but found none | NOT OK | Consistency |
43+
| typed-arrays.js:5 | expected an alert, but found none | NOT OK | Consistency |
44+
| typed-arrays.js:7 | expected an alert, but found none | NOT OK | Consistency |
45+
| typed-arrays.js:11 | expected an alert, but found none | NOT OK | Consistency |
4346
flow
4447
| access-path-sanitizer.js:2:18:2:25 | source() | access-path-sanitizer.js:4:8:4:12 | obj.x |
4548
| addexpr.js:4:10:4:17 | source() | addexpr.js:7:8:7:8 | x |
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function test() {
2+
let x = source();
3+
4+
let y = new Uint8Array(x);
5+
sink(y); // NOT OK
6+
7+
sink(y.buffer); // NOT OK
8+
sink(y.length);
9+
10+
var arr = new Uint8Array(y.buffer, y.byteOffset, y.byteLength);
11+
sink(arr); // NOT OK
12+
}

0 commit comments

Comments
 (0)