From b4ab4d1a20ec5ae95e5fc2947d31a75015083651 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Thu, 2 Sep 2021 13:47:09 +0800 Subject: [PATCH] [TD-5992] add json check --- src/client/src/tscSystem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/src/tscSystem.c b/src/client/src/tscSystem.c index f23ec1548c..f65e845e49 100644 --- a/src/client/src/tscSystem.c +++ b/src/client/src/tscSystem.c @@ -446,7 +446,7 @@ static int taos_set_config_imp(const char *config){ } taosInitGlobalCfg(); cJSON *root = cJSON_Parse(config); - if (root == NULL) { + if (root == NULL || !cJSON_IsObject(root) || cJSON_GetArraySize(root) == 0) { return -1; } -- GitLab