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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user