jq_fuzz_parse.c
This file
Path
tests/jq_fuzz_parse.c
21 lines · 456 bytes · C
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than fa6a2ff point at it.
website: remove unused root path on building website (#3248)itchynybefore adoptionfa6a2ff
lines 1–21why, one step back1#include <stdint.h>2#include <stdlib.h>3#include <string.h>45#include "jv.h"67int LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {8 // Creat null-terminated string9 char *null_terminated = (char *)malloc(size + 1);10 memcpy(null_terminated, (char *)data, size);11 null_terminated[size] = '\0';1213 // Fuzzer entrypoint14 jv res = jv_parse(null_terminated);15 jv_free(res);1617 // Free the null-terminated string18 free(null_terminated);1920 return 0;21}