File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1- // Copyright (c) 2020-2021 The Bitcoin Core developers
1+ // Copyright (c) 2020-present The Bitcoin Core developers
22// Distributed under the MIT software license, see the accompanying
33// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44
1111#include < cassert>
1212#include < cmath>
1313#include < limits>
14+ #include < optional>
1415
1516FUZZ_TARGET (float )
1617{
1718 FuzzedDataProvider fuzzed_data_provider (buffer.data (), buffer.size ());
1819
1920 {
2021 const double d{[&] {
21- double tmp;
22+ std::optional< double > tmp;
2223 CallOneOf (
2324 fuzzed_data_provider,
2425 // an actual number
@@ -42,7 +43,7 @@ FUZZ_TARGET(float)
4243 }); },
4344 // Anything from raw memory (also checks that DecodeDouble doesn't crash on any input)
4445 [&] { tmp = DecodeDouble (fuzzed_data_provider.ConsumeIntegral <uint64_t >()); });
45- return tmp;
46+ return * tmp;
4647 }()};
4748 (void )memusage::DynamicUsage (d);
4849
You can’t perform that action at this time.
0 commit comments