From 05ac9c5b910f6ba39b33f3cc8f29b1a3c0c4544e Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 15 May 2013 10:36:12 +0200 Subject: Fix reallocation in gp_dinglibs_get_string_array(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner Reviewed-by: Simo Sorce --- proxy/src/gp_config_dinglibs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/src/gp_config_dinglibs.c b/proxy/src/gp_config_dinglibs.c index 3fc0076..cf6c7bd 100644 --- a/proxy/src/gp_config_dinglibs.c +++ b/proxy/src/gp_config_dinglibs.c @@ -144,7 +144,7 @@ int gp_dinglibs_get_string_array(struct gp_ini_context *ctx, goto done; } - array = realloc(array, count); + array = realloc(array, (count+1) * sizeof(char *)); if (array == NULL) { ret = ENOMEM; goto done; -- cgit