diff --git a/src/client/src/tscSystem.c b/src/client/src/tscSystem.c index fabe0df69be03b2dd817a1a8d56f9b2f07148f1f..7041c922d9b8ff32d6c1340fe313769cf4cf9729 100644 --- a/src/client/src/tscSystem.c +++ b/src/client/src/tscSystem.c @@ -113,7 +113,7 @@ int32_t tscAcquireRpc(const char *key, const char *user, const char *secretEncry SRpcObj rpcObj; memset(&rpcObj, 0, sizeof(rpcObj)); - tstrncpy(rpcObj.key, key, strlen(key)); + tstrncpy(rpcObj.key, key, sizeof(rpcObj.key)); rpcObj.pDnodeConn = rpcOpen(&rpcInit); if (rpcObj.pDnodeConn == NULL) { pthread_mutex_unlock(&rpcObjMutex);