Infinite loop in `unpackMultiple` with `bundleStrings: true`
yume-chan opened this issue · comments
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
This fix should be published in v1.8.0.