1 // To run fuzzer use:
2 // CC=clang-5.0 ./configure --disable-shared
3 // make CFLAGS="-g3 -Og -fsanitize=fuzzer,address" fuzzer
4 #include <stddef.h>
5 #include <stdint.h>
6 #include <stdlib.h>
7 
8 #include "iec16022ecc200.h"
9 
LLVMFuzzerTestOneInput(const uint8_t * data,size_t size)10 int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
11     int w = 0, h = 0;
12     char *enc = NULL;
13     unsigned char *res = iec16022ecc200f(&w, &h, &enc, size, data, NULL, NULL, NULL, 0);
14     free(res);
15     free(enc);
16     return 0;  // Non-zero return values are reserved for future use.
17 }
18