FreeRDP
TestFuzzCodecs.c File Reference
#include <freerdp/assistance.h>
#include <winpr/crt.h>
#include <winpr/print.h>
#include <winpr/platform.h>
#include <freerdp/codec/interleaved.h>
#include <freerdp/codec/planar.h>
#include <freerdp/codec/bulk.h>
#include <freerdp/codec/clear.h>
#include <freerdp/codec/zgfx.h>
#include <freerdp/log.h>
#include <winpr/bitstream.h>
#include <freerdp/codec/rfx.h>
#include <freerdp/codec/progressive.h>
#include <freerdp/freerdp.h>
#include <freerdp/gdi/gdi.h>
#include "../progressive.h"
#include "../mppc.h"
#include "../xcrush.h"
#include "../ncrush.h"

Functions

static BOOL test_ClearDecompressExample (UINT32 nr, UINT32 width, UINT32 height, const BYTE *pSrcData, const UINT32 SrcSize)
 
static int TestFreeRDPCodecClear (const uint8_t *Data, size_t Size)
 
static int TestFreeRDPCodecXCrush (const uint8_t *Data, size_t Size)
 
static int test_ZGfxDecompressFoxSingle (const uint8_t *Data, size_t Size)
 
static int TestFreeRDPCodecZGfx (const uint8_t *Data, size_t Size)
 
static BOOL test_NCrushDecompressBells (const uint8_t *Data, size_t Size)
 
static int TestFreeRDPCodecNCrush (const uint8_t *Data, size_t Size)
 
static int TestFreeRDPCodecRemoteFX (const uint8_t *Data, size_t Size)
 
static int test_MppcDecompressBellsRdp5 (const uint8_t *Data, size_t Size)
 
static int test_MppcDecompressBellsRdp4 (const uint8_t *Data, size_t Size)
 
static int test_MppcDecompressBufferRdp5 (const uint8_t *Data, size_t Size)
 
static int TestFreeRDPCodecMppc (const uint8_t *Data, size_t Size)
 
static BOOL progressive_decode (const uint8_t *Data, size_t Size)
 
static int TestFreeRDPCodecProgressive (const uint8_t *Data, size_t Size)
 
static BOOL i_run_encode_decode (UINT16 bpp, BITMAP_INTERLEAVED_CONTEXT *encoder, BITMAP_INTERLEAVED_CONTEXT *decoder, const uint8_t *Data, size_t Size)
 
static int TestFreeRDPCodecInterleaved (const uint8_t *Data, size_t Size)
 
static BOOL RunTestPlanar (BITMAP_PLANAR_CONTEXT *planar, const BYTE *srcBitmap, const UINT32 srcFormat, const UINT32 dstFormat, const UINT32 width, const UINT32 height, const uint8_t *Data, size_t Size)
 
static BOOL TestPlanar (const UINT32 format, const uint8_t *Data, size_t Size)
 
static int TestFreeRDPCodecPlanar (const uint8_t *Data, size_t Size)
 
int LLVMFuzzerTestOneInput (const uint8_t *Data, size_t Size)
 

Variables

static const size_t IMG_WIDTH = 64
 
static const size_t IMG_HEIGHT = 64
 
static const size_t FORMAT_SIZE = 4
 
static const UINT32 FORMAT = PIXEL_FORMAT_XRGB32
 

Function Documentation

◆ i_run_encode_decode()

static BOOL i_run_encode_decode ( UINT16  bpp,
BITMAP_INTERLEAVED_CONTEXT *  encoder,
BITMAP_INTERLEAVED_CONTEXT *  decoder,
const uint8_t *  Data,
size_t  Size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LLVMFuzzerTestOneInput()

int LLVMFuzzerTestOneInput ( const uint8_t *  Data,
size_t  Size 
)
Here is the call graph for this function:

◆ progressive_decode()

static BOOL progressive_decode ( const uint8_t *  Data,
size_t  Size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RunTestPlanar()

static BOOL RunTestPlanar ( BITMAP_PLANAR_CONTEXT *  planar,
const BYTE srcBitmap,
const UINT32  srcFormat,
const UINT32  dstFormat,
const UINT32  width,
const UINT32  height,
const uint8_t *  Data,
size_t  Size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_ClearDecompressExample()

static BOOL test_ClearDecompressExample ( UINT32  nr,
UINT32  width,
UINT32  height,
const BYTE pSrcData,
const UINT32  SrcSize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_MppcDecompressBellsRdp4()

static int test_MppcDecompressBellsRdp4 ( const uint8_t *  Data,
size_t  Size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_MppcDecompressBellsRdp5()

static int test_MppcDecompressBellsRdp5 ( const uint8_t *  Data,
size_t  Size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_MppcDecompressBufferRdp5()

static int test_MppcDecompressBufferRdp5 ( const uint8_t *  Data,
size_t  Size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_NCrushDecompressBells()

static BOOL test_NCrushDecompressBells ( const uint8_t *  Data,
size_t  Size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_ZGfxDecompressFoxSingle()

static int test_ZGfxDecompressFoxSingle ( const uint8_t *  Data,
size_t  Size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestFreeRDPCodecClear()

static int TestFreeRDPCodecClear ( const uint8_t *  Data,
size_t  Size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestFreeRDPCodecInterleaved()

static int TestFreeRDPCodecInterleaved ( const uint8_t *  Data,
size_t  Size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestFreeRDPCodecMppc()

static int TestFreeRDPCodecMppc ( const uint8_t *  Data,
size_t  Size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestFreeRDPCodecNCrush()

static int TestFreeRDPCodecNCrush ( const uint8_t *  Data,
size_t  Size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestFreeRDPCodecPlanar()

static int TestFreeRDPCodecPlanar ( const uint8_t *  Data,
size_t  Size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestFreeRDPCodecProgressive()

static int TestFreeRDPCodecProgressive ( const uint8_t *  Data,
size_t  Size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestFreeRDPCodecRemoteFX()

static int TestFreeRDPCodecRemoteFX ( const uint8_t *  Data,
size_t  Size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestFreeRDPCodecXCrush()

static int TestFreeRDPCodecXCrush ( const uint8_t *  Data,
size_t  Size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestFreeRDPCodecZGfx()

static int TestFreeRDPCodecZGfx ( const uint8_t *  Data,
size_t  Size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ TestPlanar()

static BOOL TestPlanar ( const UINT32  format,
const uint8_t *  Data,
size_t  Size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ FORMAT

const UINT32 FORMAT = PIXEL_FORMAT_XRGB32
static

◆ FORMAT_SIZE

const size_t FORMAT_SIZE = 4
static

◆ IMG_HEIGHT

const size_t IMG_HEIGHT = 64
static

◆ IMG_WIDTH

const size_t IMG_WIDTH = 64
static