msgpackr
msgpackr copied to clipboard
Infinite loop in `unpackMultiple` with `bundleStrings: true`
Repro:
const { Packr } = require('msgpackr')
const options = {
bundleStrings: true,
sequential: true,
};
const packer = new Packr(options);
const unpacker = new Packr(options);
const data = { data: 42 }; // key length >= 4
unpacker.unpackMultiple(Buffer.concat([
packer.pack(data),
packer.pack(data)
]));
It never finishes and the memory usage continues growing, eventually it runs out of memory.
msgpackr version: 1.7.2 Node version: 16.15.1