Files
ladybird/Libraries/LibJS/Tests/builtins/DataView/DataView-invalid-length-overflow.js
2024-11-10 12:50:45 +01: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");
});