Show More
@@ -10,7 +10,7 b'' | |||||
10 | #include <inttypes.h> |
|
10 | #include <inttypes.h> | |
11 | #include <stdlib.h> |
|
11 | #include <stdlib.h> | |
12 |
|
12 | |||
13 |
#include |
|
13 | #include <fuzzer/FuzzedDataProvider.h> | |
14 |
|
14 | |||
15 | extern "C" { |
|
15 | extern "C" { | |
16 |
|
16 | |||
@@ -27,17 +27,15 b' int LLVMFuzzerTestOneInput(const uint8_t' | |||||
27 | if (Size > 100000) { |
|
27 | if (Size > 100000) { | |
28 | return 0; |
|
28 | return 0; | |
29 | } |
|
29 | } | |
30 | auto maybe_inputs = SplitInputs(Data, Size); |
|
30 | FuzzedDataProvider provider(Data, Size); | |
31 | if (!maybe_inputs) { |
|
31 | std::string left = provider.ConsumeRandomLengthString(Size); | |
32 | return 0; |
|
32 | std::string right = provider.ConsumeRemainingBytesAsString(); | |
33 | } |
|
|||
34 | auto inputs = std::move(maybe_inputs.value()); |
|
|||
35 | mmfile_t a, b; |
|
33 | mmfile_t a, b; | |
36 |
|
34 | |||
37 |
a.ptr = |
|
35 | a.ptr = (char *)left.c_str(); | |
38 |
a.size = |
|
36 | a.size = left.size(); | |
39 |
b.ptr = |
|
37 | b.ptr = (char *)right.c_str(); | |
40 |
b.size = |
|
38 | b.size = right.size(); | |
41 | xpparam_t xpp = { |
|
39 | xpparam_t xpp = { | |
42 | XDF_INDENT_HEURISTIC, /* flags */ |
|
40 | XDF_INDENT_HEURISTIC, /* flags */ | |
43 | }; |
|
41 | }; |
General Comments 0
You need to be logged in to leave comments.
Login now