mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
Added test case for Uint8Array and TypedArray.prototype.buffer
This commit is contained in:
@@ -40,6 +40,9 @@ consistencyIssue
|
||||
| nested-props.js:20 | expected an alert, but found none | NOT OK - but not found | Consistency |
|
||||
| stringification-read-steps.js:17 | expected an alert, but found none | NOT OK | Consistency |
|
||||
| stringification-read-steps.js:25 | expected an alert, but found none | NOT OK | Consistency |
|
||||
| typed-arrays.js:5 | expected an alert, but found none | NOT OK | Consistency |
|
||||
| typed-arrays.js:7 | expected an alert, but found none | NOT OK | Consistency |
|
||||
| typed-arrays.js:11 | expected an alert, but found none | NOT OK | Consistency |
|
||||
flow
|
||||
| access-path-sanitizer.js:2:18:2:25 | source() | access-path-sanitizer.js:4:8:4:12 | obj.x |
|
||||
| addexpr.js:4:10:4:17 | source() | addexpr.js:7:8:7:8 | x |
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
function test() {
|
||||
let x = source();
|
||||
|
||||
let y = new Uint8Array(x);
|
||||
sink(y); // NOT OK
|
||||
|
||||
sink(y.buffer); // NOT OK
|
||||
sink(y.length);
|
||||
|
||||
var arr = new Uint8Array(y.buffer, y.byteOffset, y.byteLength);
|
||||
sink(arr); // NOT OK
|
||||
}
|
||||
Reference in New Issue
Block a user