Skip to content

Commit

Permalink
fuzzers: fix parser fuzzers
Browse files Browse the repository at this point in the history
Signed-off-by: Braydon Kains <[email protected]>
  • Loading branch information
braydonk committed Nov 13, 2023
1 parent 911e5ff commit 7fa0fc8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/internal/fuzzers/parse_json_fuzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size){
}

fuzz_parser = flb_parser_create("fuzzer", "json", NULL, FLB_TRUE, NULL,
NULL, NULL, MK_FALSE, MK_TRUE, FLB_FALSE,
NULL, 0, NULL, fuzz_config);
NULL, NULL, MK_FALSE, MK_TRUE, FLB_FALSE,
FLB_FALSE, NULL, 0, NULL, fuzz_config);
if (fuzz_parser) {
flb_parser_do(fuzz_parser, (char*)data, size,
&out_buf, &out_size, &out_time);
Expand Down
4 changes: 2 additions & 2 deletions tests/internal/fuzzers/parse_logfmt_fuzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size){
}
fuzz_parser = flb_parser_create("fuzzer", "logfmt", NULL, FLB_TRUE,
NULL, NULL, NULL, MK_FALSE,
MK_TRUE, FLB_FALSE, NULL, 0, NULL,
fuzz_config);
MK_TRUE, FLB_FALSE, FLB_FALSE, NULL,
0, NULL, fuzz_config);
if (fuzz_parser) {
flb_parser_do(fuzz_parser, (char*)data, size,
&out_buf, &out_size, &out_time);
Expand Down
4 changes: 2 additions & 2 deletions tests/internal/fuzzers/parse_ltsv_fuzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size){
fuzz_config = flb_config_init();
fuzz_parser = flb_parser_create("fuzzer", "ltsv", NULL, FLB_TRUE,
NULL, NULL, NULL, MK_FALSE,
MK_TRUE, FLB_FALSE, NULL, 0, NULL,
fuzz_config);
MK_TRUE, FLB_FALSE, FLB_FALSE, NULL,
0, NULL, fuzz_config);
flb_parser_do(fuzz_parser, (char*)data, size,
&out_buf, &out_size, &out_time);

Expand Down
4 changes: 2 additions & 2 deletions tests/internal/fuzzers/parser_fuzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)

/* now call into the parser */
fuzz_parser = flb_parser_create("fuzzer", format, pregex, FLB_TRUE,
time_fmt, time_key, time_offset, time_keep, 0, FLB_FALSE,
types, types_len, list, fuzz_config);
time_fmt, time_key, time_offset, FLB_FALSE, /* time_system_timezone*/
time_keep, 0, FLB_FALSE, types, types_len, list, fuzz_config);

/* Second step is to use the random parser to parse random input */
if (fuzz_parser != NULL) {
Expand Down

0 comments on commit 7fa0fc8

Please sign in to comment.