[vlc-commits] decomp: fix heap overflow (fixes #12052)

Rémi Denis-Courmont git at videolan.org
Sat Aug 30 15:42:45 CEST 2014


vlc/vlc-2.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 30 16:41:53 2014 +0300| [74996ceefd63adf07e28ea80198200d74a164c9d] | committer: Rémi Denis-Courmont

decomp: fix heap overflow (fixes #12052)

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

 modules/stream_filter/decomp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_filter/decomp.c b/modules/stream_filter/decomp.c
index 5a12e87..16a4901 100644
--- a/modules/stream_filter/decomp.c
+++ b/modules/stream_filter/decomp.c
@@ -207,7 +207,7 @@ static int Read (stream_t *stream, void *buf, unsigned int buflen)
         p_sys->offset += length;
 
         if (buflen > 0)
-            length += Read (stream, ((char *)buf) + length, buflen - length);
+            length += Read (stream, buf, buflen);
         return length;
     }
     assert ((buf != NULL) || (buflen == 0));



More information about the vlc-commits mailing list