[vlc-commits] httplive: fix stack overflow

Francois Cartegnie git at videolan.org
Tue Sep 1 15:30:16 CEST 2015


vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Aug 31 13:53:54 2015 +0200| [aed07eeb274c17e8d6d45b4bf2ad4c8e2f1031dd] | committer: Jean-Baptiste Kempf

httplive: fix stack overflow

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=aed07eeb274c17e8d6d45b4bf2ad4c8e2f1031dd
---

 modules/stream_filter/httplive.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index e94dad5..5eb5405 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -1030,7 +1030,7 @@ static int parse_M3U8(stream_t *s, vlc_array_t *streams, uint8_t *buffer, const
             p_begin = p_read;
 
             /* */
-            if (strncmp(line, "#EXT-X-STREAM-INF", 17) == 0)
+            if (strncmp(line, "#EXT-X-STREAM-INF", 17) == 0 && !p_sys->b_meta)
             {
                 p_sys->b_meta = true;
                 char *uri = ReadLine(p_begin, &p_read, p_end - p_begin);
@@ -2105,7 +2105,6 @@ static int Open(vlc_object_t *p_this)
     if (Prefetch(s, &current) != VLC_SUCCESS)
     {
         msg_Err(s, "fetching first segment failed.");
-        goto fail;
     }
 
     p_sys->download.stream = current;



More information about the vlc-commits mailing list