The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
Functions | Variables
fuzzer_util.c File Reference
#include <freeradius-devel/util/dl.h>
#include <freeradius-devel/util/conf.h>
#include <freeradius-devel/util/dict.h>
#include <freeradius-devel/util/proto.h>
#include <freeradius-devel/util/syserror.h>
#include <freeradius-devel/io/test_point.h>
+ Include dependency graph for fuzzer_util.c:

Go to the source code of this file.

Functions

static void exitHandler (void)
 
static fr_dict_protocol_tfuzzer_dict_init (void *dl_handle, char const *proto)
 
int LLVMFuzzerInitialize (int *argc, char ***argv)
 
int LLVMFuzzerTestOneInput (const uint8_t *buf, size_t len)
 

Variables

static TALLOC_CTX * autofree = NULL
 
static fr_dict_tdict = NULL
 
static dl_tdl = NULL
 
static dl_loader_tdl_loader
 
static fr_dict_protocol_tdl_proto
 
static bool do_encode = false
 
static uint8_t encoded_data [65536]
 
static bool init = false
 
static fr_dict_attr_t const * root_da = NULL
 
fr_test_point_proto_decode_t util_tp_decode_proto
 
fr_test_point_proto_encode_t util_tp_encode_proto
 

Function Documentation

◆ exitHandler()

static void exitHandler ( void  )
static

Definition at line 56 of file fuzzer_util.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fuzzer_dict_init()

static fr_dict_protocol_t * fuzzer_dict_init ( void *  dl_handle,
char const *  proto 
)
inlinestatic

Definition at line 78 of file fuzzer_util.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LLVMFuzzerInitialize()

int LLVMFuzzerInitialize ( int *  argc,
char ***  argv 
)

Definition at line 94 of file fuzzer_util.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LLVMFuzzerTestOneInput()

int LLVMFuzzerTestOneInput ( const uint8_t buf,
size_t  len 
)

Definition at line 271 of file fuzzer_util.c.

+ Here is the call graph for this function:

Variable Documentation

◆ autofree

TALLOC_CTX* autofree = NULL
static

Definition at line 44 of file fuzzer_util.c.

◆ dict

fr_dict_t* dict = NULL
static

Definition at line 47 of file fuzzer_util.c.

◆ dl

dl_t* dl = NULL
static

Definition at line 41 of file fuzzer_util.c.

◆ dl_loader

dl_loader_t* dl_loader
static

Definition at line 42 of file fuzzer_util.c.

◆ dl_proto

fr_dict_protocol_t* dl_proto
static

Definition at line 43 of file fuzzer_util.c.

◆ do_encode

bool do_encode = false
static

Definition at line 45 of file fuzzer_util.c.

◆ encoded_data

uint8_t encoded_data[65536]
static

Definition at line 269 of file fuzzer_util.c.

◆ init

bool init = false
static

Definition at line 40 of file fuzzer_util.c.

◆ root_da

fr_dict_attr_t const* root_da = NULL
static

Definition at line 48 of file fuzzer_util.c.

◆ util_tp_decode_proto

fr_test_point_proto_decode_t util_tp_decode_proto
extern
Initial value:
= {
.test_ctx = decode_test_ctx,
}
static ssize_t util_decode_proto(TALLOC_CTX *ctx, UNUSED fr_pair_list_t *out, uint8_t const *data, size_t data_len, UNUSED void *proto_ctx)
Definition fuzzer.c:39
static int decode_test_ctx(void **out, UNUSED TALLOC_CTX *ctx, UNUSED fr_dict_t const *dict, UNUSED fr_dict_attr_t const *root_da)
Definition fuzzer.c:27

Definition at line 72 of file fuzzer.c.

◆ util_tp_encode_proto

fr_test_point_proto_encode_t util_tp_encode_proto
extern
Initial value:
= {
.test_ctx = decode_test_ctx,
}
static ssize_t util_encode_proto(UNUSED TALLOC_CTX *ctx, fr_pair_list_t *vps, uint8_t *data, size_t data_len, UNUSED void *proto_ctx)
Definition fuzzer.c:65

Definition at line 78 of file fuzzer.c.