diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-01-08 18:48:48 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-12-02 09:47:00 +0100 |
commit | d642f640bf39f9086a24920d97808fa40159a372 (patch) | |
tree | a47df1d1a6b0f150b10d795c53428928d2540af0 /src/fuzz | |
parent | f325aaf3417590a29d1c362a118532ea11fb020d (diff) | |
download | systemd-d642f640bf39f9086a24920d97808fa40159a372.tar.gz |
json: add flags parameter to json_parse_file(), for parsing "sensitive" data
This will call json_variant_sensitive() internally while parsing for
each allocated sub-variant. This is better than calling it a posteriori
at the end, because partially parsed variants will always be properly
erased from memory this way.
Diffstat (limited to 'src/fuzz')
-rw-r--r-- | src/fuzz/fuzz-json.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fuzz/fuzz-json.c b/src/fuzz/fuzz-json.c index ce7b69dbb9..c01e2a570c 100644 --- a/src/fuzz/fuzz-json.c +++ b/src/fuzz/fuzz-json.c @@ -18,7 +18,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { f = fmemopen_unlocked((char*) data, size, "re"); assert_se(f); - if (json_parse_file(f, NULL, &v, NULL, NULL) < 0) + if (json_parse_file(f, NULL, 0, &v, NULL, NULL) < 0) return 0; g = open_memstream_unlocked(&out, &out_size); |