Commits

Steven! Ragnarök committed f0271e3

Replace strcat with strcpy to fix a bug.

  • Participants
  • Parent commits c6c5965

Comments (0)

Files changed (1)

File src/path_lookup.c

         {
         	closedir(directory); // close the file handle
             qualifiedPath = (char*) malloc(strlen(inputPath) + strlen(inputExecutableName)); // leave one extra space for the /
-            strcat(qualifiedPath, inputPath);
+						strcpy(qualifiedPath, inputPath);
             strcat(qualifiedPath, "/");
-            strcat(qualifiedPath, inputExecutableName);           
+            strcat(qualifiedPath, inputExecutableName);
             return qualifiedPath; // return the fully qualified path to the program
         }
 	  }
 char* resolve_path(char* inputExecutableName)
 {
 	return searchVariable(getenv("PATH"), inputExecutableName);
-}
+}