shithub: dav1d

Download patch

ref: e664029a462d949ff6cfe9846016cfe61b07b6e9
parent: 2faf1016f0d6b8a0d39c3796738a38095972e231
author: Janne Grunau <janne-vlc@jannau.net>
date: Thu Oct 4 18:35:59 EDT 2018

fuzzer: use only external API and do not depend on config.h

Makes building under oss-fuzz easier.

--- a/tests/libfuzzer/dav1d_fuzzer.c
+++ b/tests/libfuzzer/dav1d_fuzzer.c
@@ -30,9 +30,11 @@
 #include <stdint.h>
 #include <string.h>
 
-#include <dav1d.h>
+#include <dav1d/dav1d.h>
 
-#include "common/intops.h"
+static unsigned r32le(const uint8_t *const p) {
+    return (p[3] << 24U) | (p[2] << 16U) | (p[1] << 8U) | p[0];
+}
 
 // expects ivf input
 
@@ -55,7 +57,7 @@
     while (ptr <= data + size - 4) {
         Dav1dData buf;
 
-        size_t frame_size = rl32(ptr);
+        size_t frame_size = r32le(ptr);
         ptr += 4;
 
         if (frame_size > size || ptr > data + size - frame_size)