ladybird/Userland/Libraries/LibJS/Tests/builtins/DataView/DataView-invalid-read-and-write.js
2021-08-11 22:56:58 +01:00

9 lines
322 B
JavaScript

test("Issue #9336, integer overflow in get_view_value", () => {
const dataView = new DataView(new ArrayBuffer(16));
expect(() => {
dataView.getUint32(0xfffffffc);
}).toThrowWithMessage(
RangeError,
"Data view byte offset 4294967292 is out of range for buffer with length 16"
);
});