diff options
author | Reinhard Nißl <rnissl@gmx.de> | 2008-03-11 23:03:38 +0100 |
---|---|---|
committer | Reinhard Nißl <rnissl@gmx.de> | 2008-03-11 23:03:38 +0100 |
commit | 1c4e2a1b547e26f48b5797edcf54c43ba6f6e213 (patch) | |
tree | 4397afc6256968fa3ee2ae75cfdb46f1c4367351 | |
parent | 8405a6c9ce882f09c11963fcc0fbc2dcbac57c4f (diff) | |
download | xine-lib-1c4e2a1b547e26f48b5797edcf54c43ba6f6e213.tar.gz xine-lib-1c4e2a1b547e26f48b5797edcf54c43ba6f6e213.tar.bz2 |
Fix buffer size calculation by using more appropriate calloc().
-rw-r--r-- | src/xine-engine/configfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |