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

Shell: Make history range values larger than u32 a syntax error

Found by oss-fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29792&sort=reported&q=serenity
This commit is contained in:
AnotherTest 2021-02-02 20:20:05 +03:30 committed by Andreas Kling
parent d4dd4a82bb
commit e3ec759f97
3 changed files with 28 additions and 5 deletions

View file

@ -1364,6 +1364,10 @@ HistoryEvent::HistoryEvent(Position position, HistorySelector selector)
: Node(move(position))
, m_selector(move(selector))
{
if (m_selector.word_selector_range.start.syntax_error_node)
set_is_syntax_error(*m_selector.word_selector_range.start.syntax_error_node);
else if (m_selector.word_selector_range.end.has_value() && m_selector.word_selector_range.end->syntax_error_node)
set_is_syntax_error(*m_selector.word_selector_range.end->syntax_error_node);
}
HistoryEvent::~HistoryEvent()