You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
The UTF16<->UTF8 offset map computation in OnigString skips unmatched high surrogates, while v8's UTF16->UTF8 converter interprets them as "literal" code points.
This can lead to a situation where utf8OffsetToUtf16 is not completely initialized (as the unmatched high surrogates are skipped).
Moreover, the ConvertUtf8OffsetToUtf16 and ConvertUtf16OffsetToUtf8 are lacking index bounds checks.
I have a PR ready to fix these issues, sorry about introducing them in the first place.
The text was updated successfully, but these errors were encountered:
From microsoft/vscode#10945
The UTF16<->UTF8 offset map computation in
OnigString
skips unmatched high surrogates, while v8's UTF16->UTF8 converter interprets them as "literal" code points.This can lead to a situation where
utf8OffsetToUtf16
is not completely initialized (as the unmatched high surrogates are skipped).Moreover, the
ConvertUtf8OffsetToUtf16
andConvertUtf16OffsetToUtf8
are lacking index bounds checks.I have a PR ready to fix these issues, sorry about introducing them in the first place.
The text was updated successfully, but these errors were encountered: