LibRegex: Allow null bytes in pattern

That check was rather pointless as the input is a StringView which knows
its own bounds.
Fixes #9686.
This commit is contained in:
Ali Mohammad Pur 2021-08-30 20:20:58 +04:30 committed by Andreas Kling
commit 206bc01f81
Notes: sideshowbarker 2024-07-18 05:05:00 +09:00
2 changed files with 2 additions and 4 deletions

View file

@ -660,6 +660,7 @@ TEST_CASE(ECMA262_match)
{ "[\\0]"sv, "\0"sv, true, ECMAScriptFlags::BrowserExtended },
{ "[\\0]"sv, "\0"sv, true, combine_flags(ECMAScriptFlags::Unicode, ECMAScriptFlags::BrowserExtended) },
{ "[\\01]"sv, "\1"sv, true, ECMAScriptFlags::BrowserExtended },
{ "(\0|a)"sv, "a"sv, true }, // #9686, Should allow null bytes in pattern
};
// clang-format on