diff --git a/source/common/src/tmisce.c b/source/common/src/tmisce.c index f1713cfd98..dfaebc99f6 100644 --- a/source/common/src/tmisce.c +++ b/source/common/src/tmisce.c @@ -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) {