From f768dfd92592ad3714c2ee8b18893792890fcbb0 Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Thu, 18 Oct 2012 01:47:57 +0200 Subject: tsdemux: fix potential crash dereferencing NULL program pointer https://bugzilla.gnome.org/show_bug.cgi?id=686358 --- gst/mpegtsdemux/tsdemux.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gst') 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); -- cgit v1.2.1