1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00

fuzz-json: also try self-merge operations

This might even work ;)
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-05-09 15:14:33 +02:00
parent 96d651a22b
commit dbd27c6d28

View File

@ -105,7 +105,12 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
r = json_variant_filter(&v, STRV_MAKE("a", "b", "c", "d", "e")); r = json_variant_filter(&v, STRV_MAKE("a", "b", "c", "d", "e"));
log_debug_errno(r, "json_variant_filter: %d/%m", r); log_debug_errno(r, "json_variant_filter: %d/%m", r);
// TODO: json_variant_merge(&v, …); /* I assume we can merge v with itself… */
// TODO: json_variant_append_array(&v, …); r = json_variant_merge(&v, v);
log_debug_errno(r, "json_variant_merge: %d/%m", r);
r = json_variant_append_array(&v, v);
log_debug_errno(r, "json_variant_append_array: %d/%m", r);
return 0; return 0;
} }