Fixed #6009: Bounds checks in autodetect_recv_bandwidth_measure_results

This commit is contained in:
akallabeth 2020-03-31 09:19:17 +02:00
parent 9301bfe730
commit f5e73cc7c9
1 changed files with 2 additions and 0 deletions

View File

@ -465,6 +465,8 @@ static BOOL autodetect_recv_bandwidth_measure_results(rdpRdp* rdp, wStream* s,
return FALSE;
WLog_VRB(AUTODETECT_TAG, "received Bandwidth Measure Results PDU");
if (Stream_GetRemainingLength(s) < 8)
return -1;
Stream_Read_UINT32(s, rdp->autodetect->bandwidthMeasureTimeDelta); /* timeDelta (4 bytes) */
Stream_Read_UINT32(s, rdp->autodetect->bandwidthMeasureByteCount); /* byteCount (4 bytes) */