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

OMJSON can stack overflow when reading large varaibles #17

Open
sclaiborne opened this issue Sep 6, 2024 · 0 comments
Open

OMJSON can stack overflow when reading large varaibles #17

sclaiborne opened this issue Sep 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sclaiborne
Copy link
Member

This is caused by varValueToJsonString when reading STRINGs or WSTRINGs that size is greater than remaining stack size. Note it does not depend on the length of the STRING.

Located in jsonAux.c

// Stringify - Do not use variable.value. It is limited to 120 characters, which is not enough
// for strings.
// TODO: This can cause a stack overflow if variable.length is very large.
//		Maybe add a max size
STRING tempString[pVariable->length + 50];
@sclaiborne sclaiborne added the bug Something isn't working label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant