diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-05-08 18:11:39 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-05-08 18:11:43 -0400 |
commit | b55866969e248cbd912a1c298e3ba375685575dc (patch) | |
tree | 8c83ff55782c2e120aa3565f2591a0bbb2f65288 | |
parent | 5b24f6084ede92d0f493ff416b4726245140b2c1 (diff) | |
parent | 095bc9a10691505c3d0fdacb6caeb62bfdcf1732 (diff) | |
download | bitcoin-b55866969e248cbd912a1c298e3ba375685575dc.tar.xz |
Merge #18917: fuzz: fix vector size problem in system fuzzer
095bc9a10691505c3d0fdacb6caeb62bfdcf1732 fuzz: fix vector size problem in system fuzzer (Harris)
Pull request description:
This PR fixes a problem with vector resizing in system fuzzer (*case 7* there). Originally, this problem was discussed in PR https://github.com/bitcoin/bitcoin/pull/18908
ACKs for top commit:
MarcoFalke:
ACK 095bc9a10691505c3d0fdacb6caeb62bfdcf1732
practicalswift:
ACK 095bc9a10691505c3d0fdacb6caeb62bfdcf1732
brakmic:
> ACK [095bc9a](https://github.com/bitcoin/bitcoin/commit/095bc9a10691505c3d0fdacb6caeb62bfdcf1732)
Tree-SHA512: 73e6004ee51d68a34b49c79d1329a8c4865c21da888801c0fcc7f1bcacb510bf371bb61675eda83e53d08e0f24712e671369719523b0ced0eb2a22607bfa1d3d
-rw-r--r-- | src/test/fuzz/system.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/fuzz/system.cpp b/src/test/fuzz/system.cpp index 7f378c2b13..01b523cee4 100644 --- a/src/test/fuzz/system.cpp +++ b/src/test/fuzz/system.cpp @@ -85,7 +85,7 @@ void test_one_input(const std::vector<uint8_t>& buffer) case 7: { const std::vector<std::string> random_arguments = ConsumeRandomLengthStringVector(fuzzed_data_provider); std::vector<const char*> 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()); } |