Commit bf622010 authored by MathisRosenhauer's avatar MathisRosenhauer Committed by GitHub

Merge pull request #2 from schwehr/fuzzer

Minor cleanup of fuzz_target.cc
parents 01785605 28df6818
#include <stdlib.h>
#include <stdint.h>
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include "libaec.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
struct aec_stream strm;
int32_t *source;
unsigned char *dest;
if (Size < 2)
return 0;
dest = (unsigned char *)malloc(Size * 4);
unsigned char *dest = static_cast<unsigned char *>(malloc(Size * 4));
struct aec_stream strm;
strm.bits_per_sample = (Data[0] & 0x1f) | 1;
strm.block_size = 8 << (Data[1] & 3);
strm.rsi = 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment