Skip to content

JSON_PARSER.parse_string can exhaust memory #160

@colin-adams

Description

@colin-adams

If an incomplete JSON document is being parsed (e.g. if you have only fetched 8K out of a 380K HTTP response), then parse_string will keep appending NULLs to the end of the string until memory is exhausted. This is because it keeps calling next without then testing if we have passed the end of the data, and actual returns %U.

It should check if we have passed the end of the data and set has_more to True (and is_parsed to False).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions