From c8782ff75feb14413b5d295564a894ba292dd800 Mon Sep 17 00:00:00 2001 From: shenglian zhou Date: Fri, 29 Apr 2022 16:01:40 +0800 Subject: [PATCH] fix errors caused by buffer overflow --- src/client/src/tscParseLineProtocol.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/client/src/tscParseLineProtocol.c b/src/client/src/tscParseLineProtocol.c index 93bbe0e95c..c4e24e62e2 100644 --- a/src/client/src/tscParseLineProtocol.c +++ b/src/client/src/tscParseLineProtocol.c @@ -874,7 +874,7 @@ static int32_t addChildTableDataPointsToInsertSql(char* cTableName, char* sTable free(colKVs); if (r == fromIndex) { - tscError("buf can not fit one line"); + tscError("buffer can not fit one line"); } *nextIndex = r; *cTableSqlLen = totalLen; @@ -984,8 +984,6 @@ static int32_t applyDataPointsWithSqlInsert(TAOS* taos, TAOS_SML_DATA_POINT* poi pCTablePoints = taosHashIterate(cname2points, pCTablePoints); } - usedBytes += cTableSqlLen; - freeBytes -= cTableSqlLen; batch->sql[usedBytes] = '\0'; info->numBatches++; tscDebug("SML:0x%"PRIx64" sql: %s" , info->id, batch->sql); -- GitLab