Fixed formatting and source/destination length use

This commit is contained in:
akallabeth 2021-02-12 08:30:01 +01:00 committed by akallabeth
parent 99fa312079
commit 6a908d8115
1 changed files with 5 additions and 4 deletions

View File

@ -686,7 +686,7 @@ static BOOL freerdp_settings_int_buffer_copy(rdpSettings* _settings, const rdpSe
if (!_settings->ServerRandom)
goto out_fail;
CopyMemory(_settings->ServerRandom, settings->ServerRandom, _settings->ServerRandomLength);
CopyMemory(_settings->ServerRandom, settings->ServerRandom, settings->ServerRandomLength);
_settings->ServerRandomLength = settings->ServerRandomLength;
}
@ -697,7 +697,7 @@ static BOOL freerdp_settings_int_buffer_copy(rdpSettings* _settings, const rdpSe
if (!_settings->ClientRandom)
goto out_fail;
CopyMemory(_settings->ClientRandom, settings->ClientRandom, _settings->ClientRandomLength);
CopyMemory(_settings->ClientRandom, settings->ClientRandom, settings->ClientRandomLength);
_settings->ClientRandomLength = settings->ClientRandomLength;
}
@ -708,10 +708,11 @@ static BOOL freerdp_settings_int_buffer_copy(rdpSettings* _settings, const rdpSe
if (!_settings->ServerCertificate)
goto out_fail;
CopyMemory(_settings->ServerCertificate, settings->ServerCertificate, _settings->ServerCertificateLength);
CopyMemory(_settings->ServerCertificate, settings->ServerCertificate,
settings->ServerCertificateLength);
_settings->ServerCertificateLength = settings->ServerCertificateLength;
}
if (settings->RdpServerCertificate)
{
_settings->RdpServerCertificate = certificate_clone(settings->RdpServerCertificate);