Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if you exceed CHUNK_SIZE safari will crash with a range error #88

Merged
merged 1 commit into from
Oct 30, 2019

Conversation

chrisnojima
Copy link
Contributor

Hi,
I noticed when I passed very long strings to decode it would crash out with RangeError: Maximum call stack size exceeded.. The code seemingly already protects against this with CHUNK_SIZE but allows it to go over by 4 items due to the - 4 (unclear why this exists). Removing the -4 stops this crash.

@gfx
Copy link
Member

gfx commented Oct 30, 2019

That - 4 means max length of UTF-8 multi-bytes, but it seems not to make sense. Thanks for your contribution!

@gfx gfx merged commit 7056ea2 into msgpack:master Oct 30, 2019
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.

2 participants