From 673a1e6fb9ea2b61d97be45b8f9852c70a69778c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 4 Apr 2019 12:24:38 +0200 Subject: Add fmemopen_unlocked() and use unlocked ops in fuzzers and some other tests This might make things marginially faster. I didn't benchmark though. --- src/fuzz/fuzz-nspawn-oci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/fuzz/fuzz-nspawn-oci.c') 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 - #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. -- cgit v1.2.1