1
mirror of https://code.videolan.org/videolan/dav1d synced 2024-09-27 11:50:24 +02:00

fuzzer: improve coverage of lib.c

This commit is contained in:
Janne Grunau 2018-10-11 22:13:05 +02:00 committed by Ronald S. Bultje
parent 520894c6d1
commit a7bc6b8f2e

View File

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