diff --git a/libfreerdp/core/settings.c b/libfreerdp/core/settings.c index 7013d1fba..a888a7f15 100644 --- a/libfreerdp/core/settings.c +++ b/libfreerdp/core/settings.c @@ -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);