File tree Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 23
23
24
24
#include < test/fuzz/fuzz.h>
25
25
26
- void test_one_input (std::vector<uint8_t > buffer)
26
+ void test_one_input (const std::vector<uint8_t >& buffer)
27
27
{
28
28
CDataStream ds (buffer, SER_NETWORK, INIT_PROTO_VERSION);
29
29
try {
Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ static void initialize()
30
30
// This function is used by libFuzzer
31
31
extern " C" int LLVMFuzzerTestOneInput (const uint8_t * data, size_t size)
32
32
{
33
- test_one_input (std::vector<uint8_t >(data, data + size));
33
+ const std::vector<uint8_t > input (data, data + size);
34
+ test_one_input (input);
34
35
return 0 ;
35
36
}
36
37
Original file line number Diff line number Diff line change 9
9
#include < vector>
10
10
11
11
12
- void test_one_input (std::vector<uint8_t > buffer);
12
+ void test_one_input (const std::vector<uint8_t >& buffer);
13
13
14
14
#endif // BITCOIN_TEST_FUZZ_FUZZ_H
Original file line number Diff line number Diff line change 11
11
/* * Flags that are not forbidden by an assert */
12
12
static bool IsValidFlagCombination (unsigned flags);
13
13
14
- void test_one_input (std::vector<uint8_t > buffer)
14
+ void test_one_input (const std::vector<uint8_t >& buffer)
15
15
{
16
16
CDataStream ds (buffer, SER_NETWORK, INIT_PROTO_VERSION);
17
17
try {
You can’t perform that action at this time.
0 commit comments