diff options
author | Aleksey Yulin <ulin@tut.by> | 2009-07-16 19:49:26 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-07-16 19:52:22 +0200 |
commit | 2db8d6ea0bc3b6bd4eab91b167c5af790e1a6e0f (patch) | |
tree | ea0c45fb42c308073db88a278258ddc1f5efda5d /gst/mpegdemux | |
parent | 1b246c72d19616a20a85697aebab6146da44d364 (diff) | |
download | gst-plugins-bad-2db8d6ea0bc3b6bd4eab91b167c5af790e1a6e0f.tar.gz gst-plugins-bad-2db8d6ea0bc3b6bd4eab91b167c5af790e1a6e0f.tar.bz2 gst-plugins-bad-2db8d6ea0bc3b6bd4eab91b167c5af790e1a6e0f.zip |
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.
Diffstat (limited to 'gst/mpegdemux')
-rw-r--r-- | gst/mpegdemux/gstmpegtsdemux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/mpegdemux/gstmpegtsdemux.c b/gst/mpegdemux/gstmpegtsdemux.c index cb082a2b..65539d0a 100644 --- a/gst/mpegdemux/gstmpegtsdemux.c +++ b/gst/mpegdemux/gstmpegtsdemux.c @@ -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] && |