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
Pipeline #2612 passed with stages
in 5 minutes and 13 seconds
...@@ -90,6 +90,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) ...@@ -90,6 +90,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
if (frame_size > size || ptr > data + size - frame_size) if (frame_size > size || ptr > data + size - frame_size)
break; break;
if (!frame_size) continue;
// copy frame data to a new buffer to catch reads past the end of input // copy frame data to a new buffer to catch reads past the end of input
p = dav1d_data_create(&buf, frame_size); p = dav1d_data_create(&buf, frame_size);
if (!p) goto cleanup; if (!p) goto cleanup;
...@@ -110,7 +112,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) ...@@ -110,7 +112,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
} }
} while (buf.sz > 0); } while (buf.sz > 0);
if (buf.sz > 0 || frame_size == 0) if (buf.sz > 0)
dav1d_data_unref(&buf); 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