Skip to content

Commit f5e73cc

Browse files
committed
Fixed #6009: Bounds checks in autodetect_recv_bandwidth_measure_results
1 parent 9301bfe commit f5e73cc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: libfreerdp/core/autodetect.c

+2
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,8 @@ static BOOL autodetect_recv_bandwidth_measure_results(rdpRdp* rdp, wStream* s,
465465
return FALSE;
466466

467467
WLog_VRB(AUTODETECT_TAG, "received Bandwidth Measure Results PDU");
468+
if (Stream_GetRemainingLength(s) < 8)
469+
return -1;
468470
Stream_Read_UINT32(s, rdp->autodetect->bandwidthMeasureTimeDelta); /* timeDelta (4 bytes) */
469471
Stream_Read_UINT32(s, rdp->autodetect->bandwidthMeasureByteCount); /* byteCount (4 bytes) */
470472

0 commit comments

Comments
 (0)