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

fuzzer: improve coverage of lib.c

parent 520894c6
...@@ -46,6 +46,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) ...@@ -46,6 +46,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
const uint8_t *ptr = data; const uint8_t *ptr = data;
int err; int err;
dav1d_version();
if (size < 32) goto end; if (size < 32) goto end;
ptr += 32; // skip ivf header ptr += 32; // skip ivf header
...@@ -91,6 +93,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) ...@@ -91,6 +93,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
} while (err == 0); } while (err == 0);
cleanup: cleanup:
dav1d_flush(ctx);
dav1d_close(&ctx); dav1d_close(&ctx);
end: end:
return 0; return 0;
......
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