summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-01-08 14:59:24 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-01-08 14:59:24 (GMT)
commitc336a9b1ac995fdc6f12815416425c2c44d4f2e8 (patch)
tree4f9a076d34b562cf8b39c3584529e2b0a8baa65c /Source/cmCTest.cxx
parent4f4984ff7fb4fb2800937edf577844cda86d3a6a (diff)
downloadCMake-c336a9b1ac995fdc6f12815416425c2c44d4f2e8.zip
CMake-c336a9b1ac995fdc6f12815416425c2c44d4f2e8.tar.gz
CMake-c336a9b1ac995fdc6f12815416425c2c44d4f2e8.tar.bz2
BUG: make sure null terminator is in the right place for putenv static char array
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 5c8abc3..e82ef4b 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -2820,7 +2820,6 @@ int cmCTest::RunMakeCommand(const char* command, std::string* output,
int cmCTest::RunTest(std::vector<const char*> argv, std::string* output, int *retVal)
{
-#if 0
if(cmSystemTools::SameFile(argv[0], m_CTestSelf.c_str()))
{
cmCTest inst;
@@ -2840,7 +2839,6 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output, int *re
}
return cmsysProcess_State_Exited;
}
-#endif
std::vector<char> tempOutput;
if ( output )
{
@@ -3000,7 +2998,7 @@ int cmCTest::RunConfigurationScript()
size = 4999;
}
strncpy(ctestEnvStatic[i], envArgs[i].c_str(), size);
- ctestEnvStatic[i][4999] = 0;
+ ctestEnvStatic[i][size] = 0;
putenv(ctestEnvStatic[i]);
}
}