diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2019-10-07 08:28:01 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2019-10-07 08:48:35 +0000 |
commit | ffa22212560c9e7a8692cb8982d9b3b507ee9af1 (patch) | |
tree | 156ec3bb70eff63734d42f87b491c99cf2359c75 /src/test/fuzz/fuzz.cpp | |
parent | 7b701fef58f627956d597817a1f9422edd890cdc (diff) | |
download | bitcoin-ffa22212560c9e7a8692cb8982d9b3b507ee9af1.tar.xz |
tests: Pass fuzzing inputs as constant references
Diffstat (limited to 'src/test/fuzz/fuzz.cpp')
-rw-r--r-- | src/test/fuzz/fuzz.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/fuzz/fuzz.cpp b/src/test/fuzz/fuzz.cpp index 0709da5563..cfa160dde2 100644 --- a/src/test/fuzz/fuzz.cpp +++ b/src/test/fuzz/fuzz.cpp @@ -30,7 +30,8 @@ static void initialize() // This function is used by libFuzzer extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { - test_one_input(std::vector<uint8_t>(data, data + size)); + const std::vector<uint8_t> input(data, data + size); + test_one_input(input); return 0; } |