From 1c4e2a1b547e26f48b5797edcf54c43ba6f6e213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reinhard=20Ni=C3=9Fl?= Date: Tue, 11 Mar 2008 23:03:38 +0100 Subject: Fix buffer size calculation by using more appropriate calloc(). --- src/xine-engine/configfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c index 37a4e38ad..00665adbc 100644 --- a/src/xine-engine/configfile.c +++ b/src/xine-engine/configfile.c @@ -1451,7 +1451,7 @@ static char* config_register_serialized_entry (config_values_t *this, const char if (!bytes) goto exit; if ((value_count < 0) || (value_count > 256)) goto exit; - enum_values = malloc (sizeof(void*) * value_count + 1); + enum_values = calloc (value_count + 1, sizeof(void*)); for (i = 0; i < value_count; i++) { pos += bytes = get_string(output, output_len, pos, &enum_values[i]); if (!bytes) goto exit; -- cgit v1.2.3