diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index c74a35030eecf80504ac07601c9dc77c8fb5b6b1..9282fa74fbab3e32f8332b69d3800d84c37e5dd6 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -125,7 +125,7 @@ static void tscUpdateVgroupInfo(SSqlObj *pObj, SRpcEpSet *pEpSet) { pVgroupInfo->inUse = pEpSet->inUse; pVgroupInfo->numOfEps = pEpSet->numOfEps; for (int32_t i = 0; i < pVgroupInfo->numOfEps; i++) { - tstrncpy(pVgroupInfo->epAddr[i].fqdn, pEpSet->fqdn[i], sizeof(pEpSet->fqdn[i])); + tstrncpy(pVgroupInfo->epAddr[i].fqdn, pEpSet->fqdn[i], TSDB_FQDN_LEN); pVgroupInfo->epAddr[i].port = pEpSet->port[i]; } tscDebug("after: EndPoint in use: %d", pVgroupInfo->inUse);