mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-06 02:55:49 +03:00
8df714ff1e
Apart from the class used audio fuzzers have identical behavior: Create a memory stream from the fuzzer input and pass this to the loader, then try to load audio until an error occurs. Since the loader plugins need to have the same static create() function anyways for LibAudio itself, we can unify the fuzzer implementations and reduce code duplication.
14 lines
334 B
C++
14 lines
334 B
C++
/*
|
|
* Copyright (c) 2023, kleines Filmröllchen <filmroellchen@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include "AudioFuzzerCommon.h"
|
|
#include <LibAudio/MP3Loader.h>
|
|
|
|
extern "C" int LLVMFuzzerTestOneInput(uint8_t const* data, size_t size)
|
|
{
|
|
return fuzz_audio_loader<Audio::MP3LoaderPlugin>(data, size);
|
|
}
|