]>
git.proxmox.com Git - systemd.git/blob - src/fuzz/fuzz-nspawn-oci.c
1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 #include "alloc-util.h"
8 #include "nspawn-oci.h"
10 int LLVMFuzzerTestOneInput(const uint8_t *data
, size_t size
) {
11 _cleanup_fclose_
FILE *f
= NULL
;
12 _cleanup_(settings_freep
) Settings
*s
= NULL
;
17 f
= fmemopen((char*) data
, size
, "re");
20 /* We don't want to fill the logs with messages about parse errors.
21 * Disable most logging if not running standalone */
22 if (!getenv("SYSTEMD_LOG_LEVEL"))
23 log_set_max_level(LOG_CRIT
);
25 (void) oci_load(f
, "/dev/null", &s
);