Coverage Report

Created: 2026-07-24 07:16

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/knot-dns/tests-fuzz/fuzz_zscanner.c
Line
Count
Source
1
/*  Copyright (C) CZ.NIC, z.s.p.o. and contributors
2
 *  SPDX-License-Identifier: GPL-2.0-or-later
3
 *  For more information, see <https://www.knot-dns.cz/>
4
 */
5
6
#include <stdint.h>
7
8
#include "libzscanner/scanner.h"
9
10
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
11
9.40k
{
12
9.40k
  zs_scanner_t s;
13
9.40k
  if (zs_init(&s, ".", 1, 0) == 0 &&
14
9.40k
      zs_set_input_string(&s, (const char *)data, size) == 0) {
15
9.40k
    zs_parse_all(&s);
16
9.40k
  }
17
9.40k
  zs_deinit(&s);
18
  
19
9.40k
  return 0;
20
9.40k
}