mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-13 04:52:23 +00:00
LibRegex: Check code unit count range when accessing by code unit count
This commit is contained in:
parent
f4b26b0cea
commit
e43b478920
Notes:
sideshowbarker
2024-07-18 04:46:35 +09:00
Author: https://github.com/alimpfard
Commit: e43b478920
Pull-request: https://github.com/SerenityOS/serenity/pull/14592
Reviewed-by: https://github.com/linusg ✅
1 changed files with 1 additions and 1 deletions
|
@ -532,7 +532,7 @@ ALWAYS_INLINE ExecutionResult OpCode_Compare::execute(MatchInput const& input, M
|
|||
|
||||
} else if (compare_type == CharacterCompareType::CharClass) {
|
||||
|
||||
if (input.view.length() <= state.string_position)
|
||||
if (input.view.length() <= state.string_position_in_code_units)
|
||||
return ExecutionResult::Failed_ExecuteLowPrioForks;
|
||||
|
||||
auto character_class = (CharClass)m_bytecode->at(offset++);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue