mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
mpegtsparse: check offset when retrieving table_id on malformed packets
Fix bug #665988
This commit is contained in:
parent
0d40afa9f0
commit
f21ea162ad
1 changed files with 8 additions and 0 deletions
|
@ -895,6 +895,14 @@ mpegts_parse_is_psi (MpegTSParse * parse, MpegTSPacketizerPacket * packet)
|
|||
data = packet->data;
|
||||
pointer = *data++;
|
||||
data += pointer;
|
||||
/* 'pointer' value may be invalid on malformed packet
|
||||
* so we need to avoid out of range
|
||||
*/
|
||||
if (!(data < packet->data_end)) {
|
||||
GST_WARNING_OBJECT (parse,
|
||||
"Wrong offset when retrieving table id: 0x%x", pointer);
|
||||
return FALSE;
|
||||
}
|
||||
table_id = *data;
|
||||
i = 0;
|
||||
while (si_tables[i] != TABLE_ID_UNSET) {
|
||||
|
|
Loading…
Reference in a new issue