From c9fa3b2f54b1793ba420c06fed2f7bf4ec04b30f Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Fri, 18 Nov 2011 17:03:57 +0100 Subject: [PATCH 1/1] make the string large enough to avoid buffer overflows --- src/surf/surf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/surf/surf.c b/src/surf/surf.c index 2f90fa918c..142e0bcda5 100644 --- a/src/surf/surf.c +++ b/src/surf/surf.c @@ -198,7 +198,7 @@ int find_model_description(s_surf_model_description_t * table, for (i = 1; table[i].name; i++) { name_list = xbt_realloc(name_list, - strlen(name_list) + strlen(table[i].name) + 2); + strlen(name_list) + strlen(table[i].name) + 3); strcat(name_list, ", "); strcat(name_list, table[i].name); } -- 2.20.1