summaryrefslogtreecommitdiff
path: root/src/fuzz/fuzz-nspawn-oci.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-04-04 12:24:38 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-04-12 11:44:57 +0200
commit673a1e6fb9ea2b61d97be45b8f9852c70a69778c (patch)
treebbba913ad7c9353ac80367d50bac29a8d96b7ce5 /src/fuzz/fuzz-nspawn-oci.c
parent2fe21124a6560fcf1ce3b0a3004baa9bb45d1e0b (diff)
downloadsystemd-673a1e6fb9ea2b61d97be45b8f9852c70a69778c.tar.gz
Add fmemopen_unlocked() and use unlocked ops in fuzzers and some other tests
This might make things marginially faster. I didn't benchmark though.
Diffstat (limited to 'src/fuzz/fuzz-nspawn-oci.c')
-rw-r--r--src/fuzz/fuzz-nspawn-oci.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/fuzz/fuzz-nspawn-oci.c b/src/fuzz/fuzz-nspawn-oci.c
index f7b59f13ba..004230eafe 100644
--- a/src/fuzz/fuzz-nspawn-oci.c
+++ b/src/fuzz/fuzz-nspawn-oci.c
@@ -1,9 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1+ */
-#include <errno.h>
-
#include "alloc-util.h"
#include "fd-util.h"
+#include "fileio.h"
#include "fuzz.h"
#include "nspawn-oci.h"
@@ -14,7 +13,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (size == 0)
return 0;
- f = fmemopen((char*) data, size, "re");
+ f = fmemopen_unlocked((char*) data, size, "re");
assert_se(f);
/* We don't want to fill the logs with messages about parse errors.