[return checks] fix missing checks

* Stream_EnsureRemainingCapacity
* rdp_client_transition_to_state
This commit is contained in:
akallabeth 2024-09-16 05:16:18 +02:00
parent 07ea37d1d7
commit c0d06c782b
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
3 changed files with 5 additions and 4 deletions

View File

@ -2047,7 +2047,7 @@ static state_run_t rdp_recv_callback_int(rdpTransport* transport, wStream* s, vo
case CONNECTION_STATE_MULTITRANSPORT_BOOTSTRAPPING_REQUEST:
if (!rdp_client_connect_auto_detect(rdp, s))
{
rdp_client_transition_to_state(
(void)rdp_client_transition_to_state(
rdp, CONNECTION_STATE_CAPABILITIES_EXCHANGE_DEMAND_ACTIVE);
status = STATE_RUN_TRY_AGAIN;
}

View File

@ -1257,8 +1257,8 @@ static BOOL vgids_ins_perform_security_operation(vgidsContext* context, wStream*
if (!context->commandData)
return FALSE;
}
else
Stream_EnsureRemainingCapacity(context->commandData, lc);
else if (!Stream_EnsureRemainingCapacity(context->commandData, lc))
return FALSE;
Stream_Write(context->commandData, Stream_Pointer(s), lc);
Stream_SealLength(context->commandData);

View File

@ -659,7 +659,8 @@ static DWORD WINAPI tf_debug_channel_thread_func(LPVOID arg)
if (BytesReturned == 0)
break;
Stream_EnsureRemainingCapacity(s, BytesReturned);
if (!Stream_EnsureRemainingCapacity(s, BytesReturned))
break;
if (WTSVirtualChannelRead(context->debug_channel, 0, (PCHAR)Stream_Buffer(s),
(ULONG)Stream_Capacity(s), &BytesReturned) == FALSE)