[WIP] Quick stream check fixes.

This commit is contained in:
Nick Couchman 2020-04-05 15:37:33 -04:00
parent 4f1f1d71a6
commit 792e23d481
2 changed files with 2 additions and 5 deletions

View File

@ -441,7 +441,8 @@ void guac_rdpdr_fs_process_query_directory(guac_rdp_common_svc* svc,
/* If this is the first query, the path is included after padding */ /* If this is the first query, the path is included after padding */
if (initial_query) { if (initial_query) {
if (Stream_GetRemainingLength(input_stream) < 23); if (Stream_GetRemainingLength(input_stream) < 23)
return;
Stream_Seek(input_stream, 23); /* Padding */ Stream_Seek(input_stream, 23); /* Padding */

View File

@ -44,10 +44,6 @@ void guac_rdpsnd_process_receive(guac_rdp_common_svc* svc,
Stream_Seek_UINT8(input_stream); Stream_Seek_UINT8(input_stream);
Stream_Read_UINT16(input_stream, header.body_size); Stream_Read_UINT16(input_stream, header.body_size);
/* Check that the body_size actually exists in the input stream. */
if (Stream_GetRemainingLength(input_stream) < header.body_size)
return;
/* /*
* If next PDU is SNDWAVE (due to receiving WaveInfo PDU previously), * If next PDU is SNDWAVE (due to receiving WaveInfo PDU previously),
* ignore the header and parse as a Wave PDU. * ignore the header and parse as a Wave PDU.