mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
LibXML: Fail gracefully on integer overflow in character references
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47738
This commit is contained in:
@@ -20,3 +20,12 @@ TEST_CASE(char_data_ending)
|
||||
return Test::Crash::Failure::DidNotCrash;
|
||||
});
|
||||
}
|
||||
|
||||
TEST_CASE(character_reference_integer_overflow)
|
||||
{
|
||||
EXPECT_NO_CRASH("parsing character references that do not fit in 32 bits should not crash", [] {
|
||||
XML::Parser parser("<G>�");
|
||||
(void)parser.parse();
|
||||
return Test::Crash::Failure::DidNotCrash;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user