Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
.. and of strcat, replaced by strncat
[simgrid.git] / tools / sg_unit_extractor.pl
index 2dee83a..4c0de32 100755 (executable)
@@ -151,8 +151,8 @@ int main(int argc, char *argv[]) {
         if (selection[0] == '\\0') {
           strcpy(selection, p);
         } else {
         if (selection[0] == '\\0') {
           strcpy(selection, p);
         } else {
-          strcat(selection, \",\");
-          strcat(selection, p);
+          strncat(selection, \",\",1);
+          strncat(selection, p, 1024);
         }
       } else if (!strcmp(argv[i], \"--verbose\")) {
         verbosity++;
         }
       } else if (!strcmp(argv[i], \"--verbose\")) {
         verbosity++;