[core,gateway] copy data for credssp

the authentication data needs to be copied for use in credssp
fixes #8811
This commit is contained in:
Armin Novak 2023-03-17 19:02:10 +01:00 committed by David Fort
parent d044a1e073
commit 937c158174

View File

@ -345,8 +345,11 @@ BOOL rpc_recv_bind_ack_pdu(rdpRpc* rpc, wStream* s)
auth_data = Stream_Pointer(s);
Stream_SetPosition(s, end);
buffer.pvBuffer = auth_data;
buffer.cbBuffer = header.common.auth_length;
buffer.pvBuffer = malloc(buffer.cbBuffer);
if (!buffer.pvBuffer)
goto fail;
memcpy(buffer.pvBuffer, auth_data, buffer.cbBuffer);
credssp_auth_take_input_buffer(rpc->auth, &buffer);
if (credssp_auth_authenticate(rpc->auth) < 0)