aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/fuzz.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-01-02 19:29:36 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-02-03 19:30:14 +0100
commitfaf7d7418cf01cb04cd457bcc630654da958a777 (patch)
tree7adaeeef624d4921c6895b715197a5dcf47b2ac7 /src/test/fuzz/fuzz.cpp
parentea96e17e1f2c2b0a949366260906ef02e560a425 (diff)
fuzz: Avoid extraneous copy of input data, using Span<>
Diffstat (limited to 'src/test/fuzz/fuzz.cpp')
-rw-r--r--src/test/fuzz/fuzz.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/fuzz/fuzz.cpp b/src/test/fuzz/fuzz.cpp
index fd87667755..e5df672163 100644
--- a/src/test/fuzz/fuzz.cpp
+++ b/src/test/fuzz/fuzz.cpp
@@ -59,8 +59,7 @@ static bool read_stdin(std::vector<uint8_t>& data)
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
static const auto& test_one_input = *Assert(g_test_one_input);
- const std::vector<uint8_t> input(data, data + size);
- test_one_input(input);
+ test_one_input({data, size});
return 0;
}