[vlc-commits] cache: fix uinitialized value on corrupt cache file
Rémi Denis-Courmont
git at videolan.org
Tue Oct 25 21:55:08 CEST 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Oct 25 22:43:03 2016 +0300| [a375ea3ea8536e3ae184f13c01ee5d73d76fb598] | committer: Rémi Denis-Courmont
cache: fix uinitialized value on corrupt cache file
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a375ea3ea8536e3ae184f13c01ee5d73d76fb598
---
src/modules/cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/modules/cache.c b/src/modules/cache.c
index a08496d..54a1bba 100644
--- a/src/modules/cache.c
+++ b/src/modules/cache.c
@@ -194,7 +194,7 @@ static int CacheLoadModuleConfig (module_t *module, FILE *file)
/* Allocate memory */
if (lines)
{
- module->p_config = malloc (lines * sizeof (module_config_t));
+ module->p_config = calloc (1, lines * sizeof (module_config_t));
if (unlikely(module->p_config == NULL))
{
module->confsize = 0;
More information about the vlc-commits
mailing list