mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-23 01:49:53 +03:00
Compare commits
No commits in common. "5cf45ad62bd3b5ad5a4978ef06246f293dc6ecd1" and "465df1650554a49531f2e9cb313f7a146a4d0627" have entirely different histories.
5cf45ad62b
...
465df16505
@ -4168,7 +4168,6 @@ BUF *DhcpModify(DHCP_MODIFY_OPTION *m, void *data, UINT size)
|
||||
LIST *opt_list2 = NULL;
|
||||
UINT src_size = size;
|
||||
UINT i;
|
||||
UINT dhcp_min_size;
|
||||
// Validate arguments
|
||||
if (m == NULL || data == NULL || size == 0)
|
||||
{
|
||||
@ -4271,13 +4270,11 @@ BUF *DhcpModify(DHCP_MODIFY_OPTION *m, void *data, UINT size)
|
||||
// Rewrite if anything changes. Do not rewrite if there is no change
|
||||
ret_ok = true;
|
||||
|
||||
// If src_size is greater than DHCP_MIN_SIZE, then use the src_size as minimum size of DHCP.
|
||||
dhcp_min_size = MAX(src_size, DHCP_MIN_SIZE);
|
||||
if (ret->Size < dhcp_min_size)
|
||||
if (ret->Size < DHCP_MIN_SIZE)
|
||||
{
|
||||
// Padding
|
||||
UCHAR *pad_buf;
|
||||
UINT pad_size = dhcp_min_size - ret->Size;
|
||||
UINT pad_size = DHCP_MIN_SIZE - ret->Size;
|
||||
|
||||
pad_buf = ZeroMalloc(pad_size);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user