mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
AK: Check for overflow parsing IPv4 number in URL
Fixes OSS fuzz issue: https://oss-fuzz.com/download?testcase_id=6045676088459264
This commit is contained in:
parent
453dd0cf44
commit
3748f1d290
2 changed files with 15 additions and 5 deletions
|
@ -535,4 +535,10 @@ TEST_CASE(ipv4_address)
|
|||
EXPECT(url.is_valid());
|
||||
EXPECT_EQ(MUST(url.serialized_host()), "52.251.94.56"sv);
|
||||
}
|
||||
|
||||
{
|
||||
constexpr auto ipv4_url = "http://9111111111"sv;
|
||||
URL url(ipv4_url);
|
||||
EXPECT(!url.is_valid());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue