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

fix:heap overflow

上级 f7ed0b18
...@@ -1216,7 +1216,8 @@ static int32_t smlInsertData(SSmlHandle *info) { ...@@ -1216,7 +1216,8 @@ static int32_t smlInsertData(SSmlHandle *info) {
if(info->pRequest->dbList == NULL){ if(info->pRequest->dbList == NULL){
info->pRequest->dbList = taosArrayInit(1, TSDB_DB_FNAME_LEN); 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); SSmlTableInfo **oneTable = (SSmlTableInfo **)taosHashIterate(info->childTables, NULL);
while (oneTable) { while (oneTable) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册