23RCSID(
"$Id: c5d09af656653f0d577e834eeba7a1684020434d $")
25#include <freeradius-devel/build.h>
37#include <json-c/json.h>
65 ctx = talloc_init(
"fuzzer_json");
73 split_point = (
data[0] * size) / 256;
74 if (split_point >= size - 1) {
75 split_point = size / 2;
81 if (split_point > 1) {
83 json_object *json_obj = NULL;
87 json_obj = json_tokener_parse(str);
89 json_object_put(json_obj);
98 if (split_point < size - 1) {
99 size_t len = size - split_point - 1;
105 (
const char *)(
data + split_point + 1),
struct fr_jpath_node_s fr_jpath_node_t
int LLVMFuzzerInitialize(int *argc, char ***argv)
ssize_t fr_jpath_parse(void *ctx, fr_jpath_node_t **head, char const *in, size_t inlen)
int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len)
Functions which we wish were included in the standard talloc distribution.
#define talloc_strndup(_ctx, _str, _len)
static size_t char fr_sbuff_t size_t inlen