Skip to content

json_decode: strings cut off after first null-byte #7

@Briareos

Description

@Briareos

In json-c 1.3.2 executing

var_dump(json_decode('{"foo\u0000bar":"bar\u0000baz"}', true));

outputs

array(1) {
  ["foo"] =>
  string(3) "bar"
}

while in json 1.2.1 it outputs

array(1) {
  ["foobar"]=>
  string(7) "barbaz"
}

thus braking stuff mentioned here (among other things).

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