kriszyp / msgpackr

Ultra-fast MessagePack implementation with extension for record and structural cloning / msgpack.org[JavaScript/NodeJS]
MIT License
489 stars 53 forks source link

Node v22 [ERR_BUFFER_OUT_OF_BOUNDS]: "length" is outside of buffer bounds #144

Open wieczorek-arch opened 3 months ago

wieczorek-arch commented 3 months ago

Hi,

Not sure if that should be worrying but on newest nodejs I get following error: RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: "length" is outside of buffer bounds at proto.utf8Write (node:internal/buffer:1066:13)

While trying to run simple test:

const { Packr } = require('msgpackr')
const packer = new Packr({
    useRecords: true
})

packer.pack({"a":"ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss"})

I have checked that on multiple lower versions and problem does not exist.

crazylexa commented 3 months ago

https://github.com/nodejs/node/issues/54518

kriszyp commented 1 month ago

I believe this has been fixed, right? (Its a nodejs bug)

Samuron commented 1 month ago

It was fixed in node 22, but on node 23 it happens again

aryamohanan commented 3 weeks ago

We are also facing the same issue in v23. Has a fix been released, or is there an estimated timeline for its resolution?

kriszyp commented 3 weeks ago

Just to be clear, was this not fixed in v1.11.2? (I thought it was)

aryamohanan commented 3 weeks ago

Yes, its seems fixed in v1.11.2.