Debian Codegraph @

fuzz/fuzz.h

raw
1 /*
2 * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
3 *
4 * SPDX-License-Identifier: MPL-2.0
5 *
6 * This Source Code Form is subject to the terms of the Mozilla Public
7 * License, v. 2.0. If a copy of the MPL was not distributed with this
8 * file, you can obtain one at https://mozilla.org/MPL/2.0/.
9 *
10 * See the COPYRIGHT file distributed with this work for additional
11 * information regarding copyright ownership.
12 */
13
14 #pragma once
15
16 #include <stdbool.h>
17 #include <stddef.h>
18 #include <stdint.h>
19
20 #include <isc/dir.h>
21 #include <isc/lang.h>
22 #include <isc/mem.h>
23 #include <isc/once.h>
24 #include <isc/types.h>
25 #include <isc/util.h>
26
27 #include <dst/dst.h>
28
29 ISC_LANG_BEGINDECLS
30
31 extern bool debug;
32
33 int
34 LLVMFuzzerInitialize(int *argc ISC_ATTR_UNUSED, char ***argv ISC_ATTR_UNUSED);
35
36 int
37 LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
38
39 #define CHECK(x) \
40 if ((x) != ISC_R_SUCCESS) { \
41 return (0); \
42 }
43
44 ISC_LANG_ENDDECLS