mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
LibRegex: Check code unit count range when accessing by code unit count
This commit is contained in:
committed by
Linus Groh
parent
f4b26b0cea
commit
e43b478920
@@ -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++);
|
||||
|
||||
Reference in New Issue
Block a user