From 095bc9a10691505c3d0fdacb6caeb62bfdcf1732 Mon Sep 17 00:00:00 2001 From: Harris Date: Fri, 8 May 2020 20:21:48 +0200 Subject: [PATCH] fuzz: fix vector size problem in system fuzzer Co-authored-by: Pieter Wuille --- src/test/fuzz/system.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/fuzz/system.cpp b/src/test/fuzz/system.cpp index 7f378c2b13b..01b523cee48 100644 --- a/src/test/fuzz/system.cpp +++ b/src/test/fuzz/system.cpp @@ -85,7 +85,7 @@ void test_one_input(const std::vector& buffer) case 7: { const std::vector random_arguments = ConsumeRandomLengthStringVector(fuzzed_data_provider); std::vector argv; - argv.resize(random_arguments.size()); + argv.reserve(random_arguments.size()); for (const std::string& random_argument : random_arguments) { argv.push_back(random_argument.c_str()); }