From f87d5be3992679cd3ab1af4c2a43188be938d7d5 Mon Sep 17 00:00:00 2001 From: slguan Date: Sat, 14 Mar 2020 19:00:55 +0800 Subject: [PATCH] [TD-22] When the tag length of a table in Tdengine is a specific value, query from grafana may cause crash --- src/modules/http/src/gcJson.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/modules/http/src/gcJson.c b/src/modules/http/src/gcJson.c index 8f59633714..51f7f18345 100644 --- a/src/modules/http/src/gcJson.c +++ b/src/modules/http/src/gcJson.c @@ -126,10 +126,10 @@ bool gcBuildQueryJson(HttpContext *pContext, HttpSqlCmd *cmd, TAOS_RES *result, // for group by if (groupFields != -1) { - char target[HTTP_GC_TARGET_SIZE]; + char target[HTTP_GC_TARGET_SIZE] = {0}; int len; - len = snprintf(target,HTTP_GC_TARGET_SIZE,"%s{",aliasBuffer); - for (int i = dataFields + 1; i