[vlc-commits] input: access: fix double free

Francois Cartegnie git at videolan.org
Thu Jan 7 14:30:20 CET 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jan  6 19:18:45 2016 +0100| [d2f9d3617f7715cf1ca2f4ebf9e0cf83604331f6] | committer: Francois Cartegnie

input: access: fix double free

If block comes from sys from previous read
and reaches zero payload, it will be double freed.

(happens when removing stream_filters between
demux/access)

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

 src/input/access.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/input/access.c b/src/input/access.c
index b55e311..aac3d43 100644
--- a/src/input/access.c
+++ b/src/input/access.c
@@ -237,7 +237,10 @@ static ssize_t AStreamReadBlock(stream_t *s, void *buf, size_t len)
     block->i_buffer -= copy;
 
     if (block->i_buffer == 0)
+    {
         block_Release(block);
+        sys->block = NULL;
+    }
     else
         sys->block = block;
 



More information about the vlc-commits mailing list