mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 17:49:40 +00:00
LibRegex: Consider EOF in the middle of a range an error
This commit is contained in:
parent
1b2728f1ed
commit
9cdea2d521
Notes:
sideshowbarker
2024-07-18 09:08:51 +09:00
Author: https://github.com/alimpfard
Commit: 9cdea2d521
Pull-request: https://github.com/SerenityOS/serenity/pull/8704
1 changed files with 3 additions and 0 deletions
|
@ -193,6 +193,9 @@ ALWAYS_INLINE bool AbstractPosixParser::parse_bracket_expression(Vector<CompareT
|
|||
} else if (values.last().type == CharacterCompareType::Char) {
|
||||
values.append({ CharacterCompareType::RangeExpressionDummy, 0 });
|
||||
|
||||
if (done())
|
||||
return set_error(Error::MismatchingBracket);
|
||||
|
||||
if (match(TokenType::HyphenMinus)) {
|
||||
consume();
|
||||
// Valid range, add ordinary character
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue