Coverage Report

Created: 2024-07-27 06:07

/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.14k
{
15
1.14k
    unsigned long int buffer_length = sizeof(buffer);
16
17
1.14k
    if (Z_OK != uncompress2(buffer, &buffer_length, data, &size))
18
1.14k
        return 0;
19
20
2
    return 0;
21
1.14k
}