1:255.13-alt1
[systemd_ALT.git] / src / nspawn / fuzz-nspawn-settings.c
blobe45bfd8fdd8b088611156112668f1fe8536602cd
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
3 #include "alloc-util.h"
4 #include "fd-util.h"
5 #include "fuzz.h"
6 #include "nspawn-settings.h"
8 int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
9 _cleanup_fclose_ FILE *f = NULL;
10 _cleanup_(settings_freep) Settings *s = NULL;
12 if (outside_size_range(size, 0, 65536))
13 return 0;
15 f = data_to_file(data, size);
16 assert_se(f);
18 fuzz_setup_logging();
20 (void) settings_load(f, "/dev/null", &s);
22 return 0;