mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +00:00
LibRegex: Ensure escaped code points are exactly 4 digits in length
This commit is contained in:
parent
e887314472
commit
2e4b6fd1ac
Notes:
sideshowbarker
2024-07-18 05:40:52 +09:00
Author: https://github.com/trflynn89
Commit: 2e4b6fd1ac
Pull-request: https://github.com/SerenityOS/serenity/pull/9367
Reviewed-by: https://github.com/linusg ✅
3 changed files with 12 additions and 7 deletions
|
@ -503,6 +503,8 @@ TEST_CASE(ECMA262_parse)
|
|||
{ "(?", regex::Error::InvalidCaptureGroup },
|
||||
{ "\\u1234", regex::Error::NoError, regex::ECMAScriptFlags::Unicode },
|
||||
{ "[\\u1234]", regex::Error::NoError, regex::ECMAScriptFlags::Unicode },
|
||||
{ "\\u1", regex::Error::InvalidPattern, regex::ECMAScriptFlags::Unicode },
|
||||
{ "[\\u1]", regex::Error::InvalidPattern, regex::ECMAScriptFlags::Unicode },
|
||||
{ ",(?", regex::Error::InvalidCaptureGroup }, // #4583
|
||||
{ "{1}", regex::Error::InvalidPattern },
|
||||
{ "{1,2}", regex::Error::InvalidPattern },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue