X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4a7c1b616954da0364587049be1741592bd2eb5a..a5945452ef5b1114fd7c2fab0e865d776775c34d:/src/simgrid/sg_config.cpp diff --git a/src/simgrid/sg_config.cpp b/src/simgrid/sg_config.cpp index d7b07e86b7..7578e0506f 100644 --- a/src/simgrid/sg_config.cpp +++ b/src/simgrid/sg_config.cpp @@ -369,11 +369,11 @@ static void describe_model(char *result, const char *description) { char *p = result + - sprintf(result, "%s. Possible values: %s", description, + snprintf(result,1024-strlen(result), "%s. Possible values: %s", description, model_description[0].name ? model_description[0].name : "n/a"); for (int i = 1; model_description[i].name; i++) - p += sprintf(p, ", %s", model_description[i].name); - sprintf(p, ".\n (use 'help' as a value to see the long description of each %s)", name); + p += snprintf(p,1024, ", %s", model_description[i].name); + snprintf(p,1024, ".\n (use 'help' as a value to see the long description of each %s)", name); } /* create the config set, register what should be and parse the command line*/