fix strcpy_s

pull/6763/head
Halil Ozan Akgul 2023-03-10 12:32:50 +03:00
parent 4289d4a981
commit e8d516f0f0
1 changed files with 2 additions and 2 deletions

View File

@ -205,7 +205,7 @@ AttributeQueryIfAnnotated(const char *query_string, CmdType commandType)
} }
/* attributeToTenant = (char *) malloc(strlen(tenantId)); */ /* attributeToTenant = (char *) malloc(strlen(tenantId)); */
strcpy_s(attributeToTenant, tenantId); strcpy_s(attributeToTenant, sizeof(attributeToTenant), tenantId);
} }
else else
{ {
@ -550,7 +550,7 @@ CreateTenantStats(MultiTenantMonitor *monitor)
{ {
int tenantIndex = monitor->tenantCount; int tenantIndex = monitor->tenantCount;
strcpy_s(monitor->tenants[tenantIndex].tenantAttribute, attributeToTenant); strcpy_s(monitor->tenants[tenantIndex].tenantAttribute, sizeof(monitor->tenants[tenantIndex].tenantAttribute), attributeToTenant);
monitor->tenants[tenantIndex].colocationGroupId = colocationGroupId; monitor->tenants[tenantIndex].colocationGroupId = colocationGroupId;
monitor->tenants[tenantIndex].namedLockTranche.trancheId = LWLockNewTrancheId(); monitor->tenants[tenantIndex].namedLockTranche.trancheId = LWLockNewTrancheId();