From 951bb53057b02b68d44431f59b65325e558c6be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 9 May 2014 15:26:31 +0200 Subject: [PATCH] hls: Remove invalid free data does not have to be freed at all here, it's a pointer to an arbitrary position inside the current line. Also don't reuse the data variable for anything else, that will cause crashes in playlists that have the I-frame playlist URI followed by other attributes. CID 1212127 --- ext/hls/m3u8.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ext/hls/m3u8.c b/ext/hls/m3u8.c index f091584411..5c7fd17495 100644 --- a/ext/hls/m3u8.c +++ b/ext/hls/m3u8.c @@ -427,12 +427,12 @@ gst_m3u8_update (GstM3U8 * self, gchar * data, gboolean * updated) if (uri[0] == '"') uri += 1; - data = uri_join (self->uri, uri); + uri = uri_join (self->uri, uri); g_free (urip); - if (data == NULL) + if (uri == NULL) continue; - gst_m3u8_set_uri (new_list, data); + gst_m3u8_set_uri (new_list, uri); } } @@ -441,7 +441,6 @@ gst_m3u8_update (GstM3U8 * self, gchar * data, gboolean * updated) (GCompareFunc) _m3u8_compare_uri)) { GST_DEBUG ("Already have a list with this URI"); gst_m3u8_free (new_list); - g_free (data); } else { self->iframe_lists = g_list_append (self->iframe_lists, new_list); }