Rizin
unix-like reverse engineering framework and cli tools
fuzz_data_producer.h
Go to the documentation of this file.
1 #include <stddef.h>
2 #include <stdint.h>
3 #include <stdio.h>
4 #include <stdlib.h>
5 
6 #include "fuzz_helpers.h"
7 #include "lz4frame.h"
8 #include "lz4hc.h"
9 
10 /* Struct used for maintaining the state of the data */
12 
13 /* Returns a data producer state struct. Use for producer initialization. */
15 
16 /* Frees the data producer */
18 
19 /* Returns 32 bits from the end of data */
21 
22 /* Returns value between [min, max] */
24 
25 /* Combination of above two functions for non adaptive use cases. ie where size is not involved */
27  uint32_t max);
28 
29 /* Returns lz4 preferences */
31 
32 /* Returns lz4 frame info */
34 
35 /* Returns the size of the remaining bytes of data in the producer */
int max
Definition: enough.c:225
LZ4F_frameInfo_t FUZZ_dataProducer_frameInfo(FUZZ_dataProducer_t *producer)
void FUZZ_dataProducer_free(FUZZ_dataProducer_t *producer)
uint32_t FUZZ_getRange_from_uint32(uint32_t seed, uint32_t min, uint32_t max)
size_t FUZZ_dataProducer_remainingBytes(FUZZ_dataProducer_t *producer)
uint32_t FUZZ_dataProducer_range32(FUZZ_dataProducer_t *producer, uint32_t min, uint32_t max)
LZ4F_preferences_t FUZZ_dataProducer_preferences(FUZZ_dataProducer_t *producer)
FUZZ_dataProducer_t * FUZZ_dataProducer_create(const uint8_t *data, size_t size)
uint32_t FUZZ_dataProducer_retrieve32(FUZZ_dataProducer_t *producer)
voidpf void uLong size
Definition: ioapi.h:138
#define min(a, b)
Definition: qsort.h:83
unsigned int uint32_t
Definition: sftypes.h:29
unsigned char uint8_t
Definition: sftypes.h:31
const uint8_t * data