Skip to content

bound recovery scan to input end in xs_textdecoder_decode#1637

Open
rootvector2 wants to merge 1 commit into
Moddable-OpenSource:publicfrom
rootvector2:textdecoder-recovery-bounds
Open

bound recovery scan to input end in xs_textdecoder_decode#1637
rootvector2 wants to merge 1 commit into
Moddable-OpenSource:publicfrom
rootvector2:textdecoder-recovery-bounds

Conversation

@rootvector2

Copy link
Copy Markdown
Contributor

the illegal-sequence recovery loop in xs_textdecoder_decode scans continuation bytes without checking src < srcEnd, so a streaming decode() that finishes a buffered partial lead with a short final chunk runs src past the input and passes a negative length to the trailing c_memcpy; caught with an asan build of xst.

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