[channels,rdpgfx] check available stream length

This commit is contained in:
Armin Novak
2026-02-09 13:18:51 +01:00
parent 58409406af
commit 2e3b77e28a

View File

@@ -1306,7 +1306,8 @@ static UINT rdpgfx_recv_wire_to_surface_2_pdu(GENERIC_CHANNEL_CALLBACK* callback
Stream_Read_UINT8(s, pdu.pixelFormat); /* pixelFormat (1 byte) */
Stream_Read_UINT32(s, pdu.bitmapDataLength); /* bitmapDataLength (4 bytes) */
pdu.bitmapData = Stream_Pointer(s);
Stream_Seek(s, pdu.bitmapDataLength);
if (!Stream_SafeSeek(s, pdu.bitmapDataLength))
return ERROR_INVALID_DATA;
DEBUG_RDPGFX(gfx->log,
"RecvWireToSurface2Pdu: surfaceId: %" PRIu16 " codecId: %s (0x%04" PRIX16 ") "