23RCSID(
"$Id: 3281402f3d8d7b4ed480616e9425d0f6bf064eb7 $")
25#include <freeradius-devel/build.h>
26#include <freeradius-devel/util/talloc.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)
#define talloc_strndup(_ctx, _str, _len)
static size_t talloc_strlen(char const *s)
Returns the length of a talloc array containing a string.
static size_t char fr_sbuff_t size_t inlen