node/test/parallel/test-v8-deserialize-buffer.js
Robert Nagy deb5effe01
v8: out of bounds copy
Fixes: https://github.com/nodejs/node/issues/54573

Co-authored-by: ronag <ronagy@icloud.com>
Co-authored-by: ramidzkh <ramidzkh@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/55261
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2024-10-07 11:11:29 +00:00

12 lines
409 B
JavaScript

'use strict';
const common = require('../common');
const v8 = require('v8');
process.on('warning', common.mustNotCall());
v8.deserialize(v8.serialize(Buffer.alloc(0)));
v8.deserialize(v8.serialize({ a: new Int32Array(1024) }));
v8.deserialize(v8.serialize({ b: new Int16Array(8192) }));
v8.deserialize(v8.serialize({ c: new Uint32Array(1024) }));
v8.deserialize(v8.serialize({ d: new Uint16Array(8192) }));