diff --git a/src/client/src/tscSystem.c b/src/client/src/tscSystem.c index bbd448e2d8b5069fae438d7adb9de14a31446d1b..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)); - strncpy(rpcObj.key, key, strlen(key)); + tstrncpy(rpcObj.key, key, sizeof(rpcObj.key)); rpcObj.pDnodeConn = rpcOpen(&rpcInit); if (rpcObj.pDnodeConn == NULL) { pthread_mutex_unlock(&rpcObjMutex);