summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2012-10-18 01:47:57 +0200
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2012-10-18 17:54:41 +0100
commitf768dfd92592ad3714c2ee8b18893792890fcbb0 (patch)
tree043534937d074faec9e641de85fc0ec90c376017 /gst
parenta931d5ced0911c6b1a691011f8ee5cbf306f18c1 (diff)
downloadgstreamer-plugins-bad-f768dfd92592ad3714c2ee8b18893792890fcbb0.tar.gz
tsdemux: fix potential crash dereferencing NULL program pointer
https://bugzilla.gnome.org/show_bug.cgi?id=686358
Diffstat (limited to 'gst')
-rw-r--r--gst/mpegtsdemux/tsdemux.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gst/mpegtsdemux/tsdemux.c b/gst/mpegtsdemux/tsdemux.c
index 0d1edcb09..aed805b90 100644
--- a/gst/mpegtsdemux/tsdemux.c
+++ b/gst/mpegtsdemux/tsdemux.c
@@ -1499,6 +1499,12 @@ gst_ts_demux_push_pending_data (GstTSDemux * demux, TSDemuxStream * stream)
goto beach;
}
+ if (G_UNLIKELY (demux->program == NULL)) {
+ GST_LOG_OBJECT (demux, "No program");
+ g_free (stream->data);
+ goto beach;
+ }
+
if (G_UNLIKELY (stream->need_newsegment))
calculate_and_push_newsegment (demux, stream);