diff options
author | Andoni Morales Alastruey <ylatuya@gmail.com> | 2012-10-18 01:47:57 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-10-18 17:54:41 +0100 |
commit | f768dfd92592ad3714c2ee8b18893792890fcbb0 (patch) | |
tree | 043534937d074faec9e641de85fc0ec90c376017 | |
parent | a931d5ced0911c6b1a691011f8ee5cbf306f18c1 (diff) | |
download | gstreamer-plugins-bad-f768dfd92592ad3714c2ee8b18893792890fcbb0.tar.gz |
tsdemux: fix potential crash dereferencing NULL program pointer
https://bugzilla.gnome.org/show_bug.cgi?id=686358
-rw-r--r-- | gst/mpegtsdemux/tsdemux.c | 6 |
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); |