Skip to content

Commit

Permalink
tests: internal: fuzzers: extend aws util fuzzer
Browse files Browse the repository at this point in the history
Signed-off-by: David Korczynski <[email protected]>
  • Loading branch information
DavidKorczynski authored and edsiper committed Mar 16, 2023
1 parent bdae18e commit da38d7f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/internal/fuzzers/aws_util_fuzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,24 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
if (s3_key_format) {
flb_sds_destroy(s3_key_format);
}
if (size > 200) {
char *json_val = get_null_terminated(100, &data, &size);
if (json_val != NULL) {
flb_sds_t s1 = flb_aws_error(json_val, strlen(json_val));
if (s1 != NULL) {
flb_sds_destroy(s1);
}
flb_free(json_val);
}
char *xml_val = get_null_terminated(100, &data, &size);
if (xml_val != NULL) {
flb_sds_t s2 = flb_aws_xml_error(xml_val, strlen(xml_val));
if (s2 != NULL) {
flb_sds_destroy(s2);
}
flb_free(xml_val);
}
}
}
}
if (format) {
Expand Down

0 comments on commit da38d7f

Please sign in to comment.