diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-05-09 15:14:33 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-05-10 17:08:37 +0200 |
commit | dbd27c6d2830aeb7173933d1f4a9a07457e4092d (patch) | |
tree | 20544fb30079187658878680a5f9dd768370e526 /src/fuzz | |
parent | basic/alloc-util: remove unnecessary parens (diff) | |
download | systemd-dbd27c6d2830aeb7173933d1f4a9a07457e4092d.tar.xz systemd-dbd27c6d2830aeb7173933d1f4a9a07457e4092d.zip |
fuzz-json: also try self-merge operations
This might even work ;)
Diffstat (limited to 'src/fuzz')
-rw-r--r-- | src/fuzz/fuzz-json.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/fuzz/fuzz-json.c b/src/fuzz/fuzz-json.c index 995a0265ba..c393fcf394 100644 --- a/src/fuzz/fuzz-json.c +++ b/src/fuzz/fuzz-json.c @@ -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")); log_debug_errno(r, "json_variant_filter: %d/%m", r); - // TODO: json_variant_merge(&v, …); - // TODO: json_variant_append_array(&v, …); + /* I assume we can merge v with itself… */ + 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; } |