blob: 42f331fc3bbc776c8584e52168b7ccff33256645 [file] [log] [blame]
hamzehd17dc6a2019-09-25 11:00:31 -07001#include "include/sparse/sparse.h"
2
3extern "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}