Commit f3499cd4 authored by Rémi Duraffort's avatar Rémi Duraffort

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

parent 32f0051a
...@@ -91,7 +91,7 @@ void vlc_vaLog (vlc_object_t *obj, int type, const char *module, ...@@ -91,7 +91,7 @@ void vlc_vaLog (vlc_object_t *obj, int type, const char *module,
p = strchr(module, '.'); p = strchr(module, '.');
size_t modlen = (p != NULL) ? (p - module) : 1; size_t modlen = (p != NULL) ? (p - module) : 1;
char modulebuf[modlen]; char modulebuf[modlen + 1];
if (p != NULL) if (p != NULL)
{ {
memcpy(modulebuf, module, modlen); memcpy(modulebuf, module, modlen);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment