aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/util.h
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2020-02-26 20:04:23 +0000
committerpracticalswift <practicalswift@users.noreply.github.com>2020-03-09 20:39:48 +0000
commite37f53648e3acc6aea75adafec4de2bdbd8cb293 (patch)
tree3936b31a4ab111274c7e25971b956741738260f9 /src/test/fuzz/util.h
parente7ddbd98937412b2e8b7a3dfacdcacfcbb1d9148 (diff)
downloadbitcoin-e37f53648e3acc6aea75adafec4de2bdbd8cb293.tar.xz
Make lifetime correctness easier to see (avoid reference lifetime extension)
Diffstat (limited to 'src/test/fuzz/util.h')
-rw-r--r--src/test/fuzz/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/fuzz/util.h b/src/test/fuzz/util.h
index a2b7d804ea..2f4aa9ad2b 100644
--- a/src/test/fuzz/util.h
+++ b/src/test/fuzz/util.h
@@ -27,7 +27,7 @@ NODISCARD inline std::vector<uint8_t> ConsumeRandomLengthByteVector(FuzzedDataPr
template <typename T>
NODISCARD inline Optional<T> ConsumeDeserializable(FuzzedDataProvider& fuzzed_data_provider, size_t max_length = 4096) noexcept
{
- const std::vector<uint8_t>& buffer = ConsumeRandomLengthByteVector(fuzzed_data_provider, max_length);
+ const std::vector<uint8_t> buffer = ConsumeRandomLengthByteVector(fuzzed_data_provider, max_length);
CDataStream ds{buffer, SER_NETWORK, INIT_PROTO_VERSION};
T obj;
try {