summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-11-17 20:44:43 (GMT)
committerBrad King <brad.king@kitware.com>2005-11-17 20:44:43 (GMT)
commit0df3c162fba0233030674f76162fb0131dbddcc5 (patch)
treee00e39d6b240dd9260b2479f714168c954dd92d1
parent70b4e1051e04be892c86aa3ff729d63ccf1f7771 (diff)
downloadCMake-0df3c162fba0233030674f76162fb0131dbddcc5.zip
CMake-0df3c162fba0233030674f76162fb0131dbddcc5.tar.gz
CMake-0df3c162fba0233030674f76162fb0131dbddcc5.tar.bz2
BUG: Do not dereference an end iterator.
-rw-r--r--Source/cmCTest.cxx2
-rw-r--r--Source/cmSystemTools.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index e9e84b5..1e079b9 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1070,7 +1070,7 @@ int cmCTest::RunTest(std::vector<const char*> argv,
}
cmsysProcess_WaitForExit(cp, 0);
- if(output)
+ if(output && tempOutput.begin() != tempOutput.end())
{
output->append(&*tempOutput.begin(), tempOutput.size());
}
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 0621ba2..623a0f9 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -507,7 +507,7 @@ bool cmSystemTools::RunSingleCommand(
}
cmsysProcess_WaitForExit(cp, 0);
- if ( output )
+ if ( output && tempOutput.begin() != tempOutput.end())
{
output->append(&*tempOutput.begin(), tempOutput.size());
}