]>
git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/isa-l/tests/fuzz/igzip_fuzz_inflate.c
1 #define _FILE_OFFSET_BITS 64
5 #include "huff_codes.h"
9 extern int LLVMFuzzerTestOneInput(const uint8_t * data
, size_t size
);
11 int main(int argc
, char *argv
[])
14 unsigned char *in_buf
= NULL
;
15 uint64_t in_file_size
;
18 fprintf(stderr
, "Usage: isal_fuzz_inflate <infile>\n");
21 in
= fopen(argv
[1], "rb");
23 fprintf(stderr
, "Can't open %s for reading\n", argv
[1]);
26 in_file_size
= get_filesize(in
);
27 in_buf
= malloc(in_file_size
);
30 fprintf(stderr
, "Failed to malloc input and outputs buffers\n");
34 fread(in_buf
, 1, in_file_size
, in
);
36 return LLVMFuzzerTestOneInput(in_buf
, in_file_size
);