Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
.. and of strcat, replaced by strncat
[simgrid.git] / tools / sg_unit_extractor.pl
index 9cbc2f5..4c0de32 100755 (executable)
@@ -5,10 +5,6 @@
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the license (GNU LGPL) which comes with this package.
 
-
-
-use strict;
-
 use strict;
 use Getopt::Long qw(GetOptions);
 
@@ -155,8 +151,8 @@ int main(int argc, char *argv[]) {
         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++;