From a8a5905ec65272e1a499d97bab2e2d4727c85112 Mon Sep 17 00:00:00 2001 From: Dongil Park Date: Fri, 15 Dec 2017 10:50:44 +0900 Subject: [PATCH] playbin3: Fix accessing invalid index in GstStream when received select-stream event If select-stream event was send to playbin3 as missing any GstStream of ES type (V or A or TEX) of collection then, playbin will access to invalid address of GstStream due to invalid index limit. This caused SIGSEGV. https://bugzilla.gnome.org/show_bug.cgi?id=791638 --- gst/playback/gstplaybin3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/playback/gstplaybin3.c b/gst/playback/gstplaybin3.c index 584d86d788..2b53f97e4a 100644 --- a/gst/playback/gstplaybin3.c +++ b/gst/playback/gstplaybin3.c @@ -2225,7 +2225,7 @@ get_combiner_stream_id (GstPlayBin3 * playbin, GstSourceCombine * combine, gint i; GList *tmp; - for (i = 0; combine->streams->len; i++) { + for (i = 0; i < combine->streams->len; i++) { GstStream *stream = (GstStream *) g_ptr_array_index (combine->streams, i); const gchar *sid = gst_stream_get_stream_id (stream); for (tmp = full_list; tmp; tmp = tmp->next) {