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

Fuzzers: Add VP9Decoder and MatroskaReader fuzzers for LibVideo

This commit is contained in:
Andrew Kaster 2022-10-11 21:44:06 -06:00 committed by Linus Groh
parent bf014c4d20
commit b704f82487
3 changed files with 34 additions and 0 deletions

View file

@ -0,0 +1,16 @@
/*
* Copyright (c) 2022, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibVideo/VP9/Decoder.h>
#include <stddef.h>
extern "C" int LLVMFuzzerTestOneInput(u8 const* data, size_t size)
{
Video::VP9::Decoder vp9_decoder;
if (auto decode_error = vp9_decoder.decode({ data, size }); decode_error.is_error())
return -1;
return 0;
}