提交 8dc5bb0e 编写于 作者: G Ganlin Zhao

fix: coverity issues

CID: 399632
上级 9aa1818a
...@@ -90,8 +90,10 @@ int64_t taosGetIntervalStartTimestamp(int64_t startTime, int64_t slidingTime, in ...@@ -90,8 +90,10 @@ int64_t taosGetIntervalStartTimestamp(int64_t startTime, int64_t slidingTime, in
SName* toName(int32_t acctId, const char* pDbName, const char* pTableName, SName* pName) { SName* toName(int32_t acctId, const char* pDbName, const char* pTableName, SName* pName) {
pName->type = TSDB_TABLE_NAME_T; pName->type = TSDB_TABLE_NAME_T;
pName->acctId = acctId; pName->acctId = acctId;
strcpy(pName->dbname, pDbName); memset(pName->dbname, 0, TSDB_DB_NAME_LEN);
strcpy(pName->tname, pTableName); strncpy(pName->dbname, pDbName, TSDB_DB_NAME_LEN - 1);
memset(pName->tname, 0, TSDB_TABLE_NAME_LEN);
strncpy(pName->tname, pTableName, TSDB_TABLE_NAME_LEN - 1);
return pName; return pName;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册