suricata
fuzz_applayerparserparse.c File Reference
#include "suricata-common.h"
#include "suricata.h"
#include "app-layer-detect-proto.h"
#include "flow-util.h"
#include "app-layer-parser.h"
#include "util-unittest-helper.h"
#include "util-byte.h"
#include "conf-yaml-loader.h"
#include "util-conf.h"
#include "confyaml.c"
Include dependency graph for fuzz_applayerparserparse.c:

Go to the source code of this file.

Macros

#define HEADER_LEN   6
 

Functions

int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size)
 
int LLVMFuzzerInitialize (int *argc, char ***argv)
 
 SC_ATOMIC_EXTERN (unsigned int, engine_stage)
 

Variables

AppLayerParserThreadCtxalp_tctx = NULL
 
const uint8_t separator [] = {0x01, 0xD5, 0xCA, 0x7A}
 
SCInstance surifuzz
 
AppProto forceLayer = 0
 

Detailed Description

Author
Philippe Antoine conta.nosp@m.ct@c.nosp@m.atena.nosp@m.cybe.nosp@m.r.fr fuzz target for AppLayerParserParse

Definition in file fuzz_applayerparserparse.c.

Macro Definition Documentation

◆ HEADER_LEN

#define HEADER_LEN   6

Definition at line 18 of file fuzz_applayerparserparse.c.

Function Documentation

◆ LLVMFuzzerInitialize()

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

Definition at line 41 of file fuzz_applayerparserparse.c.

References ALPROTO_HTTP, ALPROTO_HTTP1, ALPROTO_UNKNOWN, AppProtoToString(), ByteExtractStringUint16(), forceLayer, and StringToAppProto().

Here is the call graph for this function:

◆ LLVMFuzzerTestOneInput()

int LLVMFuzzerTestOneInput ( const uint8_t *  data,
size_t  size 
)

Definition at line 69 of file fuzz_applayerparserparse.c.

◆ SC_ATOMIC_EXTERN()

SC_ATOMIC_EXTERN ( unsigned int  ,
engine_stage   
)

Variable Documentation

◆ alp_tctx

AppLayerParserThreadCtx* alp_tctx = NULL

Definition at line 22 of file fuzz_applayerparserparse.c.

Referenced by LLVMFuzzerTestOneInput().

◆ forceLayer

AppProto forceLayer = 0

Definition at line 38 of file fuzz_applayerparserparse.c.

Referenced by LLVMFuzzerInitialize(), and LLVMFuzzerTestOneInput().

◆ separator

const uint8_t separator[] = {0x01, 0xD5, 0xCA, 0x7A}

Definition at line 36 of file fuzz_applayerparserparse.c.

Referenced by LLVMFuzzerTestOneInput().

◆ surifuzz

SCInstance surifuzz

Definition at line 37 of file fuzz_applayerparserparse.c.

Referenced by LLVMFuzzerTestOneInput().