Coverage Report

Created: 2023-05-28 06:42

/src/netcdf-c/fuzz/fuzz_open.c
Line
Count
Source
1
#include <stdio.h>
2
#include <stdlib.h>
3
#include <stdint.h>
4
#include <stdarg.h>
5
#include <string.h>
6
7
#include <netcdf.h>
8
#include <netcdf_mem.h>
9
10
114
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
11
114
    int ncid;
12
114
    if (nc_open_mem("/tmp/fuzz.nc", 0, Size, (void *) Data, &ncid) == NC_NOERR) {
13
2
        nc_close(ncid);
14
2
    }
15
114
    return 0;
16
114
}
17