8000 Snapshot Map entries before encoding their values by Aschenbath · Pull Request #165 · kawanet/msgpack-lite · GitHub
[go: up one dir, main page]

Skip to content

Snapshot Map entries before encoding their values - #165

Open
Aschenbath wants to merge 1 commit into
kawanet:mainfrom
Aschenbath:fix/oss10-20261124-9130-msgpack-map-snapshot
Open

Aschenbath wants to merge 1 commit into
kawanet:mainfrom
Aschenbath:fix/oss10-20261124-9130-msgpack-map-snapshot

Conversation

@Aschenbath
Copy link
Copy Markdown
Contributor

Encoding Map values can invoke getters or custom extension packers that add or delete entries in the same Map. The header uses the original size but forEach follows the mutated collection, producing a truncated map or bytes that are misread as the next field.

Snapshot the entries before writing the header and encoding values. Regressions nest a map in an array and mutate it by adding, deleting or clearing entries from a value getter; all three fail on main.

Validation on Node 24 / Windows: 206 Node tests and 192 Chromium tests passed; JSHint, minified bundle size/export checks and silent-import deprecation check passed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0