mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
mpegtsdemux: Don't use PIDs > MPEGTS_MAX_PID
The mpegtsdemux streams array only has MPEGTS_MAX_PID entries and accessing one afterwards will result in crashes. Fixes bug #575672.
This commit is contained in:
parent
1b246c72d1
commit
2db8d6ea0b
1 changed files with 2 additions and 1 deletions
|
@ -1697,7 +1697,8 @@ gst_mpegts_demux_parse_adaptation_field (GstMpegTSStream * stream,
|
|||
memset (pmts_checked, 0, sizeof (gboolean) * (MPEGTS_MAX_PID + 1));
|
||||
|
||||
for (j = 0; j < MPEGTS_MAX_PID + 1; j++) {
|
||||
if (demux->streams[j] && demux->streams[j]->PMT_pid) {
|
||||
if (demux->streams[j]
|
||||
&& demux->streams[j]->PMT_pid <= MPEGTS_MAX_PID) {
|
||||
if (!pmts_checked[demux->streams[j]->PMT_pid]) {
|
||||
/* check if this is correct pcr for pmt */
|
||||
if (demux->streams[demux->streams[j]->PMT_pid] &&
|
||||
|
|
Loading…
Reference in a new issue