The code was using a couple strcats on a freshly malloced buffer. The
first should be strcpy since the buffer is not yet initialized.
---
testsuite/src/test_driver.C | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testsuite/src/test_driver.C b/testsuite/src/test_driver.C
index 02eec1a..0fc3117 100644
--- a/testsuite/src/test_driver.C
+++ b/testsuite/src/test_driver.C
@@ -755,7 +755,7 @@ void updateSearchPaths(const char *filename) {
// Add current directory to the search path
const char *pathenv = getenv("PATH");
char *newpath = (char *) malloc (strlen(pathenv)+3);
- strcat(newpath, pathenv);
+ strcpy(newpath, pathenv);
strcat(newpath, ":.");
execpath = searchPath(newpath, filename);
if(execpath == NULL) {
--
1.8.1.2
|