mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:07:34 +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:
parent
1d96c30488
commit
18d25124bf
2 changed files with 14 additions and 5 deletions
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue