Skip to content

fix off-by-one read in yajl_string_encode2 separator escaping#234

Open
jmestwa-coder wants to merge 1 commit into
brianmario:masterfrom
jmestwa-coder:encode-utf8-sep-bounds
Open

fix off-by-one read in yajl_string_encode2 separator escaping#234
jmestwa-coder wants to merge 1 commit into
brianmario:masterfrom
jmestwa-coder:encode-utf8-sep-bounds

Conversation

@jmestwa-coder

Copy link
Copy Markdown

When :entities is set, the 0xe2 branch guards with len - end >= 2 but then reads str[end + 2], so a buffer ending in the bytes 0xe2 0x80 is read one past the end. With the input placed flush against a guard page:

yajl_encode.c:93  read of str[end + 2]  ->  SIGBUS (1 byte past buffer)

Matching the U+2028/U+2029 sequence needs 3 bytes available, not 2.

@jmestwa-coder

Copy link
Copy Markdown
Author

any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant