From f7ed0b184f7782ca8b46df037bb803fb8094e403 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Fri, 10 Mar 2023 10:49:51 +0800 Subject: [PATCH 1/2] fix:add log --- source/client/src/clientSml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index 984670ec1d..46cca54e42 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -1516,7 +1516,7 @@ TAOS_RES *taos_schemaless_insert_inner(TAOS *taos, char *lines[], char *rawLine, smlPrintStatisticInfo(info); if(code == TSDB_CODE_TDB_INVALID_TABLE_SCHEMA_VER || code == TSDB_CODE_SDB_OBJ_CREATING){ refreshMeta(request->pTscObj, request); - uInfo("SML:%"PRIx64" ver is old retry or object is creating:%d", info->id, code); + uInfo("SML:%"PRIx64" ver is old retry or object is creating code:%d", info->id, code); smlDestroyInfo(info); info = NULL; taos_free_result(request); From 80e0aad1f02de708f274075a8e7e7543b286fd44 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Fri, 10 Mar 2023 12:11:46 +0800 Subject: [PATCH 2/2] fix:heap overflow --- source/client/src/clientSml.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index 46cca54e42..0de4a98141 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -1216,7 +1216,8 @@ static int32_t smlInsertData(SSmlHandle *info) { if(info->pRequest->dbList == NULL){ info->pRequest->dbList = taosArrayInit(1, TSDB_DB_FNAME_LEN); } - taosArrayPush(info->pRequest->dbList, info->pRequest->pDb); + void* data = taosArrayReserve(info->pRequest->dbList, 1); + memcpy(data, info->pRequest->pDb, TSDB_DB_FNAME_LEN > strlen(info->pRequest->pDb) ? strlen(info->pRequest->pDb) : TSDB_DB_FNAME_LEN); SSmlTableInfo **oneTable = (SSmlTableInfo **)taosHashIterate(info->childTables, NULL); while (oneTable) {