Commit a79cebf2 authored by Janne Grunau's avatar Janne Grunau Committed by Ronald S. Bultje

dav1d_fuzzer: skip empty frames to avoid assertions after 02606969

parent c59f1940
......@@ -90,6 +90,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
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 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
}
} while (buf.sz > 0);
if (buf.sz > 0 || frame_size == 0)
if (buf.sz > 0)
dav1d_data_unref(&buf);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment