Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
round_trip_stream_fuzzer.c File Reference
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "fuzz_helpers.h"
#include "lz4.h"
#include "lz4hc.h"

Data Structures

struct  const_cursor_t
 
struct  cursor_t
 
struct  state_t
 

Macros

#define LZ4_STATIC_LINKING_ONLY
 
#define LZ4_HC_STATIC_LINKING_ONLY
 

Typedefs

typedef void(* round_trip_t) (state_t *state)
 

Functions

cursor_t cursor_create (size_t size)
 
void cursor_free (cursor_t cursor)
 
state_t state_create (char const *data, size_t size, uint32_t seed)
 
void state_free (state_t state)
 
int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size)
 

Variables

round_trip_t roundTrips []
 

Macro Definition Documentation

◆ LZ4_HC_STATIC_LINKING_ONLY

#define LZ4_HC_STATIC_LINKING_ONLY

◆ LZ4_STATIC_LINKING_ONLY

#define LZ4_STATIC_LINKING_ONLY

This fuzz target performs a lz4 streaming round-trip test (compress & decompress), compares the result with the original, and calls abort() on corruption.

Typedef Documentation

◆ round_trip_t

typedef void(* round_trip_t) (state_t *state)

Function Documentation

◆ cursor_create()

cursor_t cursor_create ( size_t size)

◆ cursor_free()

void cursor_free ( cursor_t cursor)

◆ LLVMFuzzerTestOneInput()

int LLVMFuzzerTestOneInput ( const uint8_t * data,
size_t size )

This fuzz target attempts to compress the fuzzed data with the simple compression function with an output buffer that may be too small to ensure that the compressor never crashes.

This fuzz target attempts to decompress the fuzzed data with the simple decompression function to ensure the decompressor never crashes.

This fuzz target performs a lz4 round-trip test (compress & decompress), compares the result with the original, and calls abort() on corruption.

◆ state_create()

state_t state_create ( char const * data,
size_t size,
uint32_t seed )

◆ state_free()

void state_free ( state_t state)

Variable Documentation

◆ roundTrips

round_trip_t roundTrips[]
Initial value:
= {
&state_prefixRoundTrip,
&state_extDictRoundTrip,
&state_loadDictRoundTrip,
&state_attachDictRoundTrip,
&state_prefixHCRoundTrip,
&state_extDictHCRoundTrip,
&state_loadDictHCRoundTrip,
&state_attachDictHCRoundTrip,
}