提交 b4ab4d1a 编写于 作者: wmmhello's avatar wmmhello

[TD-5992] add json check

上级 da149e8a
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册