File tree 1 file changed +4
-3
lines changed 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
2
2
// Distributed under the MIT software license, see the accompanying
3
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
4
11
11
#include < cassert>
12
12
#include < cmath>
13
13
#include < limits>
14
+ #include < optional>
14
15
15
16
FUZZ_TARGET (float )
16
17
{
17
18
FuzzedDataProvider fuzzed_data_provider (buffer.data (), buffer.size ());
18
19
19
20
{
20
21
const double d{[&] {
21
- double tmp;
22
+ std::optional< double > tmp;
22
23
CallOneOf (
23
24
fuzzed_data_provider,
24
25
// an actual number
@@ -42,7 +43,7 @@ FUZZ_TARGET(float)
42
43
}); },
43
44
// Anything from raw memory (also checks that DecodeDouble doesn't crash on any input)
44
45
[&] { tmp = DecodeDouble (fuzzed_data_provider.ConsumeIntegral <uint64_t >()); });
45
- return tmp;
46
+ return * tmp;
46
47
}()};
47
48
(void )memusage::DynamicUsage (d);
48
49
You can’t perform that action at this time.
0 commit comments