fix: invalid comment len

This commit is contained in:
Shengliang Guan 2022-04-20 19:05:00 +08:00
parent 7aac52e7f1
commit 32c24eedb8
1 changed files with 1 additions and 1 deletions

View File

@ -348,7 +348,7 @@ static int32_t mndStbActionUpdate(SSdb *pSdb, SStbObj *pOld, SStbObj *pNew) {
memcpy(pOld->pColumns, pNew->pColumns, pOld->numOfColumns * sizeof(SSchema)); memcpy(pOld->pColumns, pNew->pColumns, pOld->numOfColumns * sizeof(SSchema));
memcpy(pOld->pTags, pNew->pTags, pOld->numOfTags * sizeof(SSchema)); memcpy(pOld->pTags, pNew->pTags, pOld->numOfTags * sizeof(SSchema));
if (pNew->commentLen != 0) { if (pNew->commentLen != 0) {
memcpy(pOld->comment, pNew->comment, TSDB_STB_COMMENT_LEN); memcpy(pOld->comment, pNew->comment, pNew->commentLen);
} }
if (pNew->ast1Len != 0) { if (pNew->ast1Len != 0) {
memcpy(pOld->pAst1, pNew->pAst1, pNew->ast1Len); memcpy(pOld->pAst1, pNew->pAst1, pNew->ast1Len);