suricata
util-file-swf-decompression.c File Reference
#include "suricata.h"
#include "suricata-common.h"
#include "app-layer-htp.h"
#include "util-file-decompression.h"
#include "util-file-swf-decompression.h"
#include "util-misc.h"
#include "util-print.h"
#include <zlib.h>
#include <htp/lzma/LzmaDec.h>
Include dependency graph for util-file-swf-decompression.c:

Go to the source code of this file.

Macros

#define MAX_SWF_DECOMPRESSED_LEN   50000000
 

Functions

uint32_t FileGetSwfDecompressedLen (const uint8_t *buffer, const uint32_t buffer_len)
 
uint8_t FileGetSwfVersion (const uint8_t *buffer, const uint32_t buffer_len)
 
int FileSwfZlibDecompression (DetectEngineThreadCtx *det_ctx, uint8_t *compressed_data, uint32_t compressed_data_len, uint8_t *decompressed_data, uint32_t decompressed_data_len)
 
int FileSwfLzmaDecompression (DetectEngineThreadCtx *det_ctx, uint8_t *compressed_data, uint32_t compressed_data_len, uint8_t *decompressed_data, uint32_t decompressed_data_len)
 

Detailed Description

Macro Definition Documentation

#define MAX_SWF_DECOMPRESSED_LEN   50000000

Function Documentation

uint32_t FileGetSwfDecompressedLen ( const uint8_t *  buffer,
const uint32_t  buffer_len 
)

Definition at line 44 of file util-file-swf-decompression.c.

References len, MAX_SWF_DECOMPRESSED_LEN, and MIN.

Referenced by FileSwfDecompression().

Here is the caller graph for this function:

uint8_t FileGetSwfVersion ( const uint8_t *  buffer,
const uint32_t  buffer_len 
)

Definition at line 69 of file util-file-swf-decompression.c.

Referenced by FileSwfDecompression().

Here is the caller graph for this function:

int FileSwfLzmaDecompression ( DetectEngineThreadCtx det_ctx,
uint8_t *  compressed_data,
uint32_t  compressed_data_len,
uint8_t *  decompressed_data,
uint32_t  decompressed_data_len 
)
int FileSwfZlibDecompression ( DetectEngineThreadCtx det_ctx,
uint8_t *  compressed_data,
uint32_t  compressed_data_len,
uint8_t *  decompressed_data,
uint32_t  decompressed_data_len 
)

Definition at line 82 of file util-file-swf-decompression.c.

References address, DetectEngineSetEvent(), FILE_DECODER_EVENT_Z_BUF_ERROR, FILE_DECODER_EVENT_Z_DATA_ERROR, FILE_DECODER_EVENT_Z_STREAM_ERROR, and FILE_DECODER_EVENT_Z_UNKNOWN_ERROR.

Referenced by FileSwfDecompression().

Here is the call graph for this function:

Here is the caller graph for this function: