Coverage Report

Created: 2023-03-26 06:41

/src/miniz/tests/uncompress2_fuzzer.c
Line
Count
Source
1
/* Derived from zlib fuzzers at http://github.com/google/oss-fuzz/tree/master/projects/zlib,
2
 * see ossfuzz.sh for full license text.
3
*/
4
5
#include <stddef.h>
6
#include <stdint.h>
7
#include <string.h>
8
9
#include "miniz.h"
10
11
static unsigned char buffer[256 * 1024] = { 0 };
12
13
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
14
1.20k
{
15
1.20k
    unsigned long int buffer_length = sizeof(buffer);
16
17
1.20k
    if (Z_OK != uncompress2(buffer, &buffer_length, data, &size)) return 0;
18
    
19
2
    return 0;
20
1.20k
}