1 #include "include/sparse/sparse.h"
2 
LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)3 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
4   if (size < 2 * sizeof(wchar_t)) return 0;
5 
6   int64_t blocksize = 4096;
7   struct sparse_file* file = sparse_file_new(size, blocksize);
8   if (!file) {
9     return 0;
10   }
11 
12   unsigned int block = 1;
13   sparse_file_add_data(file, &data, size, block);
14   sparse_file_destroy(file);
15   return 0;
16 }
17