check unclosed arrays/objects more strictly - json2tsv - JSON to TSV converter (HTM) git clone git://git.codemadness.org/json2tsv (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit 78d6bc291c601ffda102b3572c642bd79f415449 (DIR) parent d45f1447a26996cfbaf80c5a37a3ba51a48aecb8 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 14 Oct 2019 22:55:03 +0200 check unclosed arrays/objects more strictly Diffstat: M json2tsv.c | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) --- (DIR) diff --git a/json2tsv.c b/json2tsv.c @@ -260,6 +260,10 @@ parsejson(void (*cb)(struct json_node *, size_t, const char *), const char **err value[v++] = c; } } + if (depth) { + *errstr = "unbalanced nodes"; + goto end; + } ret = 0; /* success */ *errstr = NULL;