shithub: dav1d

Download patch

ref: a79cebf2e69264adc07738df0052ccf9c6255492
parent: c59f19405362091741f441ff1a98810955a56a3f
author: Janne Grunau <janne-vlc@jannau.net>
date: Wed Nov 14 05:27:43 EST 2018

dav1d_fuzzer: skip empty frames to avoid assertions after 026069693ef

--- a/tests/libfuzzer/dav1d_fuzzer.c
+++ b/tests/libfuzzer/dav1d_fuzzer.c
@@ -90,6 +90,8 @@
         if (frame_size > size || ptr > data + size - frame_size)
             break;
 
+        if (!frame_size) continue;
+
         // copy frame data to a new buffer to catch reads past the end of input
         p = dav1d_data_create(&buf, frame_size);
         if (!p) goto cleanup;
@@ -110,7 +112,7 @@
             }
         } while (buf.sz > 0);
 
-        if (buf.sz > 0 || frame_size == 0)
+        if (buf.sz > 0)
             dav1d_data_unref(&buf);
     }