Skip to content

Parsing object does not check for start of string #43

@gfischershaw

Description

@gfischershaw

JSONValue::Parse()

// We want a string now...
std::wstring name;
if (!JSON::ExtractString(&(++(*data)), name))
{
FREE_OBJECT(object);
return NULL;
}

The code assumes that it has run into a quote char and extracts a string, but it never actually looks at what char it encountered.

BTW: The code within the "if {...}" should just be a "break;" and centralize the error cleanup. That is what the compiler is doing anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions