Files
ladybird/Tests/LibJS/Runtime/builtins/DataView/DataView-invalid-length-overflow.js
2026-01-22 07:46:48 -05:00

7 lines
275 B
JavaScript

test("Issue #13451, integer overflow in offset + view_byte_length", () => {
const arrayBuffer = new ArrayBuffer(1);
expect(() => {
new DataView(arrayBuffer, 1, 1024 * 1024 * 1024 * 4 - 1);
}).toThrowWithMessage(RangeError, "Invalid DataView length");
});