Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
codacy
[simgrid.git] / tools / sg_unit_extractor.pl
index 2dee83a05910c60b84106b760e40df22fc847d68..e626e3d0961557b53dec77857ebe2dfc5953328e 100755 (executable)
@@ -149,10 +149,10 @@ int main(int argc, char *argv[]) {
       if (!strncmp(argv[i],\"--tests=\",strlen(\"--tests=\"))) {
         char *p=strchr(argv[i],'=')+1;
         if (selection[0] == '\\0') {
       if (!strncmp(argv[i],\"--tests=\",strlen(\"--tests=\"))) {
         char *p=strchr(argv[i],'=')+1;
         if (selection[0] == '\\0') {
-          strcpy(selection, p);
+          strncpy(selection,p,1024);
         } else {
         } else {
-          strcat(selection, \",\");
-          strcat(selection, p);
+          strncat(selection, \",\",1);
+          strncat(selection, p, 1023);
         }
       } else if (!strcmp(argv[i], \"--verbose\")) {
         verbosity++;
         }
       } else if (!strcmp(argv[i], \"--verbose\")) {
         verbosity++;