Debian Codegraph @

src/fuzz/fuzz-hostname-setup.c

raw
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2
3 #include "alloc-util.h"
4 #include "fd-util.h"
5 #include "fuzz.h"
6 #include "hostname-setup.h"
7
8 int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
9 _cleanup_fclose_ FILE *f = NULL;
10 _cleanup_free_ char *ret = NULL;
11
12 f = data_to_file(data, size);
13 assert_se(f);
14
15 fuzz_setup_logging();
16
17 (void) read_etc_hostname_stream(f, /* substitute_wildcards= */ true, &ret);
18
19 return 0;
20 }