[vlc-commits] Fix buffer off-by-one (cid #1099713)

Rémi Duraffort git at videolan.org
Mon Sep 30 18:56:54 CEST 2013


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Sep 30 18:55:12 2013 +0200| [f3499cd4fb6112a4c38e26ec4c7517d03b192700] | committer: Rémi Duraffort

Fix buffer off-by-one (cid #1099713)

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

 src/misc/messages.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/misc/messages.c b/src/misc/messages.c
index 573a96a..bffe24f 100644
--- a/src/misc/messages.c
+++ b/src/misc/messages.c
@@ -91,7 +91,7 @@ void vlc_vaLog (vlc_object_t *obj, int type, const char *module,
     p = strchr(module, '.');
 
     size_t modlen = (p != NULL) ? (p - module) : 1;
-    char modulebuf[modlen];
+    char modulebuf[modlen + 1];
     if (p != NULL)
     {
         memcpy(modulebuf, module, modlen);



More information about the vlc-commits mailing list