Skip to content

OMJSON can stack overflow when reading large varaibles  #17

@sclaiborne

Description

@sclaiborne

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];

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions