Skip to content

Commit da38d7f

Browse files
DavidKorczynskiedsiper
authored andcommitted
tests: internal: fuzzers: extend aws util fuzzer
Signed-off-by: David Korczynski <[email protected]>
1 parent bdae18e commit da38d7f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/internal/fuzzers/aws_util_fuzzer.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,24 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
7474
if (s3_key_format) {
7575
flb_sds_destroy(s3_key_format);
7676
}
77+
if (size > 200) {
78+
char *json_val = get_null_terminated(100, &data, &size);
79+
if (json_val != NULL) {
80+
flb_sds_t s1 = flb_aws_error(json_val, strlen(json_val));
81+
if (s1 != NULL) {
82+
flb_sds_destroy(s1);
83+
}
84+
flb_free(json_val);
85+
}
86+
char *xml_val = get_null_terminated(100, &data, &size);
87+
if (xml_val != NULL) {
88+
flb_sds_t s2 = flb_aws_xml_error(xml_val, strlen(xml_val));
89+
if (s2 != NULL) {
90+
flb_sds_destroy(s2);
91+
}
92+
flb_free(xml_val);
93+
}
94+
}
7795
}
7896
}
7997
if (format) {

0 commit comments

Comments
 (0)