1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:28:12 +00:00

LibRegex: Check code unit count range when accessing by code unit count

This commit is contained in:
Ali Mohammad Pur 2022-07-19 21:05:31 +04:30 committed by Linus Groh
parent f4b26b0cea
commit e43b478920

View file

@ -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++);