mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 06:26:23 +00:00
rtcpbuffer: check claimed data size against available size
Coverity 1208773
This commit is contained in:
parent
9685e7a583
commit
ffdf87b121
1 changed files with 5 additions and 0 deletions
|
@ -352,6 +352,11 @@ read_packet_header (GstRTCPPacket * packet)
|
||||||
packet->item_count = 0;
|
packet->item_count = 0;
|
||||||
packet->entry_offset = 4;
|
packet->entry_offset = 4;
|
||||||
|
|
||||||
|
/* Ensure no overread from the claimed data size. The packet length
|
||||||
|
is expressed in multiple of 32 bits, to make things obvious. */
|
||||||
|
if (offset + 4 + packet->length * 4 > maxsize)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue