1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-26 03:19:52 +03:00

Fix memory overrun in policy copy

This commit is contained in:
Yihong Wu 2021-09-30 19:36:36 +08:00
parent 462ebfb960
commit 2990b5ae93
2 changed files with 2 additions and 2 deletions

View File

@ -390,7 +390,7 @@ void OverwritePolicy(POLICY **target, POLICY *p)
}
else
{
Copy(*target, p, NUM_POLICY_ITEM_FOR_VER2 * sizeof(UINT));
Copy(*target, p, policy_item[NUM_POLICY_ITEM_FOR_VER2].Offset);
}
}
}

View File

@ -7454,7 +7454,7 @@ UINT StSetLink(ADMIN *a, RPC_CREATE_LINK *t)
if (t->Policy.Ver3 == false)
{
Copy(k->Policy, &t->Policy, sizeof(UINT) * NUM_POLICY_ITEM_FOR_VER2);
Copy(k->Policy, &t->Policy, policy_item[NUM_POLICY_ITEM_FOR_VER2].Offset);
}
else
{