From f1dc1d63f7bcc2c48c61c2fe7e28f4150f5aa1e8 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Mon, 24 Oct 2022 14:16:17 +0800 Subject: [PATCH] fix: coverity issues CID: 399714 --- source/common/src/tmsg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/common/src/tmsg.c b/source/common/src/tmsg.c index 1f0023278f..94483b8a64 100644 --- a/source/common/src/tmsg.c +++ b/source/common/src/tmsg.c @@ -5124,7 +5124,7 @@ int tDecodeSVCreateTbReq(SDecoder *pCoder, SVCreateTbReq *pReq) { char name[TSDB_COL_NAME_LEN] = {0}; char *tmp = NULL; if (tDecodeCStr(pCoder, &tmp) < 0) return -1; - strcpy(name, tmp); + strncpy(name, tmp, TSDB_COL_NAME_LEN - 1); taosArrayPush(pReq->ctb.tagName, name); } } else if (pReq->type == TSDB_NORMAL_TABLE) {