1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:47:34 +00:00

Tests: Add regression tests for fixed OSS-Fuzz test cases

This commit is contained in:
Tim Ledbetter 2023-10-21 23:22:32 +01:00 committed by Andreas Kling
parent c62dded5cc
commit cb16c217b8
18 changed files with 119 additions and 0 deletions

View file

@ -59,6 +59,23 @@ TEST_CASE(vp9_oob_blocks)
decode_video("./vp9_oob_blocks.webm"sv, 240);
}
TEST_CASE(vp9_malformed_frame)
{
Array test_inputs = {
"./oss-fuzz-testcase-52630.vp9"sv,
"./oss-fuzz-testcase-53977.vp9"sv,
"./oss-fuzz-testcase-62054.vp9"sv,
"./oss-fuzz-testcase-63182.vp9"sv
};
for (auto test_input : test_inputs) {
auto file = MUST(Core::MappedFile::map(test_input));
Video::VP9::Decoder vp9_decoder;
auto maybe_decoder_error = vp9_decoder.receive_sample(file->bytes());
EXPECT(maybe_decoder_error.is_error());
}
}
BENCHMARK_CASE(vp9_4k)
{
decode_video("./vp9_4k.webm"sv, 2);