Skip to content
Snippets Groups Projects
Commit 28df6818 authored by Kurt Schwehr's avatar Kurt Schwehr
Browse files

Minor cleanup of fuzz_target.cc

- Include What You Use (IWYU) - add cstddef
- Convert to C++ includes of C headers
- Localize vars
- Combine definition and initialization of dest
- Convert C cast to C++ cast
- Remove unused source var
parent 90bd0d64
No related branches found
No related tags found
No related merge requests found
#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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment