fix: coverity issues

CID: 399614
This commit is contained in:
Ganlin Zhao 2022-10-18 11:35:35 +08:00
parent 951857430e
commit 9aa1818a47
1 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,8 @@
int32_t taosGetFqdnPortFromEp(const char* ep, SEp* pEp) {
pEp->port = 0;
strcpy(pEp->fqdn, ep);
memset(pEp->fqdn, 0, TSDB_FQDN_LEN);
strncpy(pEp->fqdn, ep, TSDB_FQDN_LEN - 1);
char* temp = strchr(pEp->fqdn, ':');
if (temp) {