hlsdemux: Fix invalid read
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 12 Oct 2012 13:09:07 +0000 (15:09 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 12 Oct 2012 13:09:07 +0000 (15:09 +0200)
gst/hls/gsthlsdemux.c

index 5c9ec6b..e39b2cc 100644 (file)
@@ -947,7 +947,7 @@ gst_hls_src_buf_to_utf8_playlist (GstBuffer * buf)
 
   /* alloc size + 1 to end with a null character */
   playlist = g_malloc0 (info.size + 1);
-  memcpy (playlist, info.data, info.size + 1);
+  memcpy (playlist, info.data, info.size);
 
   gst_buffer_unmap (buf, &info);
   gst_buffer_unref (buf);