summaryrefslogtreecommitdiffstats
path: root/media/libdav1d/test/fuzztest/dav1d_fuzz_adapter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libdav1d/test/fuzztest/dav1d_fuzz_adapter.cpp')
-rw-r--r--media/libdav1d/test/fuzztest/dav1d_fuzz_adapter.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/media/libdav1d/test/fuzztest/dav1d_fuzz_adapter.cpp b/media/libdav1d/test/fuzztest/dav1d_fuzz_adapter.cpp
new file mode 100644
index 0000000000..8f571143dd
--- /dev/null
+++ b/media/libdav1d/test/fuzztest/dav1d_fuzz_adapter.cpp
@@ -0,0 +1,15 @@
+
+#include "FuzzingInterface.h"
+
+#define LLVMFuzzerInitialize Dav1dFuzzerInitialize
+#define LLVMFuzzerTestOneInput Dav1dFuzzerTestOneInput
+
+extern "C" {
+#include "tests/libfuzzer/dav1d_fuzzer.c"
+}
+
+#undef LLVMFuzzerInitialize
+#undef LLVMFuzzerTestOneInput
+
+MOZ_FUZZING_INTERFACE_RAW(Dav1dFuzzerInitialize, Dav1dFuzzerTestOneInput,
+ Dav1dDecode);