[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
3 changed files with 5 additions and 4 deletions

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)