Merge pull request #17231 from taosdata/szhou/fixbugs
fix: fix coverity scan issues
This commit is contained in:
commit
c1ed4da67d
|
@ -959,8 +959,8 @@ int32_t udfdInitResidentFuncs() {
|
|||
char* pSave = tsUdfdResFuncs;
|
||||
char* token;
|
||||
while ((token = strtok_r(pSave, ",", &pSave)) != NULL) {
|
||||
char func[TSDB_FUNC_NAME_LEN] = {0};
|
||||
strncpy(func, token, sizeof(func));
|
||||
char func[TSDB_FUNC_NAME_LEN+1] = {0};
|
||||
strncpy(func, token, TSDB_FUNC_NAME_LEN);
|
||||
taosArrayPush(global.residentFuncs, func);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue