diff options
author | Tim Ledbetter <timledbetter@gmail.com> | 2023-04-12 17:52:12 +0100 |
---|---|---|
committer | Sam Atkins <atkinssj@gmail.com> | 2023-04-14 16:02:59 +0100 |
commit | bebcf71bdc179148820bb90fa9262b93986293fe (patch) | |
tree | 8c6e444ec11ded28716a2727cba2d3b86c5353a8 /Userland/Libraries/LibMarkdown/HorizontalRule.cpp | |
parent | 0abdffc33dd2c2d4be78e3fe9cf7e428ea21f30d (diff) | |
download | serenity-bebcf71bdc179148820bb90fa9262b93986293fe.zip |
LibMarkdown: Avoid catastrophic backtracking in thematic break regex
Fixes #17937
Diffstat (limited to 'Userland/Libraries/LibMarkdown/HorizontalRule.cpp')
-rw-r--r-- | Userland/Libraries/LibMarkdown/HorizontalRule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibMarkdown/HorizontalRule.cpp b/Userland/Libraries/LibMarkdown/HorizontalRule.cpp index 472cfa9573..4c37a0ad85 100644 --- a/Userland/Libraries/LibMarkdown/HorizontalRule.cpp +++ b/Userland/Libraries/LibMarkdown/HorizontalRule.cpp @@ -35,7 +35,7 @@ RecursionDecision HorizontalRule::walk(Visitor& visitor) const return RecursionDecision::Continue; } -static Regex<ECMA262> thematic_break_re("^ {0,3}([\\*\\-_])(\\s*\\1\\s*){2,}$"); +static Regex<ECMA262> thematic_break_re("^ {0,3}([\\*\\-_])\\s*(\\1\\s*){2,}$"); OwnPtr<HorizontalRule> HorizontalRule::parse(LineIterator& lines) { |