CMSIS2000  0.0.7
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
fuzzer.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <sys/timeb.h>
#include "lz4.h"
Include dependency graph for fuzzer.c:

Go to the source code of this file.

Macros

#define _CRT_SECURE_NO_WARNINGS
#define FUZ_avail   ROUND_PAGE(FUZ_max)
#define FUZ_max   LZ4_COMPRESSBOUND(LEN)
#define LEN   ((1<<15))
#define MOD_SEQ(x)   ((((x) >> 8) & 255) == 0)
#define NB_ATTEMPTS   (1<<18)
#define NEW_SEQ(x)   ((((x) >> 10) %10) == 0)
#define NUM_SEQ   (1 << SEQ_POW)
#define PAGE_SIZE   4096
#define PRIME1   2654435761U
#define PRIME2   2246822519U
#define PRIME3   3266489917U
#define ROUND_PAGE(x)   (((x) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
#define SEQ_MSK   ((NUM_SEQ) - 1)
#define SEQ_POW   2

Functions

static int FUZ_GetMilliSpan (int nTimeStart)
static int FUZ_GetMilliStart ()
unsigned int FUZ_rand (unsigned int *src)
int FUZ_SecurityTest ()
int main ()
int test_canary (unsigned char *buf)

Macro Definition Documentation

#define _CRT_SECURE_NO_WARNINGS

Definition at line 29 of file fuzzer.c.

#define FUZ_avail   ROUND_PAGE(FUZ_max)

Referenced by main().

#define FUZ_max   LZ4_COMPRESSBOUND(LEN)

Referenced by main().

#define LEN   ((1<<15))

Definition at line 45 of file fuzzer.c.

Referenced by main().

#define MOD_SEQ (   x)    ((((x) >> 8) & 255) == 0)

Definition at line 49 of file fuzzer.c.

Referenced by main().

#define NB_ATTEMPTS   (1<<18)

Definition at line 44 of file fuzzer.c.

Referenced by main().

#define NEW_SEQ (   x)    ((((x) >> 10) %10) == 0)

Definition at line 50 of file fuzzer.c.

Referenced by main().

#define NUM_SEQ   (1 << SEQ_POW)

Definition at line 47 of file fuzzer.c.

Referenced by main().

#define PAGE_SIZE   4096

Definition at line 51 of file fuzzer.c.

Referenced by main().

#define PRIME1   2654435761U

Definition at line 53 of file fuzzer.c.

Referenced by FUZ_rand().

#define PRIME2   2246822519U

Definition at line 54 of file fuzzer.c.

Referenced by FUZ_rand().

#define PRIME3   3266489917U

Definition at line 55 of file fuzzer.c.

Referenced by main().

#define ROUND_PAGE (   x)    (((x) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))

Definition at line 52 of file fuzzer.c.

#define SEQ_MSK   ((NUM_SEQ) - 1)

Definition at line 48 of file fuzzer.c.

Referenced by main().

#define SEQ_POW   2

Definition at line 46 of file fuzzer.c.

Function Documentation

static int FUZ_GetMilliSpan ( int  nTimeStart)
static

Definition at line 71 of file fuzzer.c.

References FUZ_GetMilliStart().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

static int FUZ_GetMilliStart ( )
static

Definition at line 62 of file fuzzer.c.

Referenced by FUZ_GetMilliSpan(), and main().

Here is the caller graph for this function:

unsigned int FUZ_rand ( unsigned int *  src)

Definition at line 80 of file fuzzer.c.

References PRIME1, and PRIME2.

Referenced by main().

Here is the caller graph for this function:

int FUZ_SecurityTest ( )

Definition at line 95 of file fuzzer.c.

References LZ4_uncompress().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

int test_canary ( unsigned char *  buf)

Definition at line 87 of file fuzzer.c.

Referenced by main().

Here is the caller graph for this function: