ladybird/Userland/Libraries/LibJS/Tests/builtins/DataView/DataView-invalid-read-and-write.js

10 lines
322 B
JavaScript
Raw Normal View History

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"
);
});