mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 07: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;
|
data = packet->data;
|
||||||
pointer = *data++;
|
pointer = *data++;
|
||||||
data += pointer;
|
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;
|
table_id = *data;
|
||||||
i = 0;
|
i = 0;
|
||||||
while (si_tables[i] != TABLE_ID_UNSET) {
|
while (si_tables[i] != TABLE_ID_UNSET) {
|
||||||
|
|
Loading…
Reference in a new issue