aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/eval_script.cpp
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2019-10-27 21:14:42 +0000
committerpracticalswift <practicalswift@users.noreply.github.com>2019-10-27 21:22:24 +0000
commit9cae3d5e94f4481e0d251c924314e57187a07a60 (patch)
tree41053973d88211253c77dc6ee7f4c426aef4f5d7 /src/test/fuzz/eval_script.cpp
parentbe50469217bd775c4305938634c32e5932f47841 (diff)
tests: Add fuzzer initialization (hold ECCVerifyHandle)
Diffstat (limited to 'src/test/fuzz/eval_script.cpp')
-rw-r--r--src/test/fuzz/eval_script.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/test/fuzz/eval_script.cpp b/src/test/fuzz/eval_script.cpp
index 9444cd489e..7acdd76857 100644
--- a/src/test/fuzz/eval_script.cpp
+++ b/src/test/fuzz/eval_script.cpp
@@ -2,12 +2,19 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#include <pubkey.h>
#include <script/interpreter.h>
-#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
+#include <test/fuzz/FuzzedDataProvider.h>
+#include <util/memory.h>
#include <limits>
+void initialize()
+{
+ static const auto verify_handle = MakeUnique<ECCVerifyHandle>();
+}
+
void test_one_input(const std::vector<uint8_t>& buffer)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());