summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestSubmitHandler.cxx
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2010-06-03 17:52:48 (GMT)
committerZach Mullen <zach.mullen@kitware.com>2010-06-03 17:52:48 (GMT)
commitd6b71078da1bf75ab3031bae5c2952a6f0bd9d45 (patch)
treeb7916ca44d7c6cfc8af9685d15511692e97d8d80 /Source/CTest/cmCTestSubmitHandler.cxx
parent082c87e5287e75e65a75d7588c40508f12e18632 (diff)
downloadCMake-d6b71078da1bf75ab3031bae5c2952a6f0bd9d45.zip
CMake-d6b71078da1bf75ab3031bae5c2952a6f0bd9d45.tar.gz
CMake-d6b71078da1bf75ab3031bae5c2952a6f0bd9d45.tar.bz2
Fix subscript out of range crash
Diffstat (limited to 'Source/CTest/cmCTestSubmitHandler.cxx')
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index fe00a82..9bbb2e6 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -61,7 +61,10 @@ private:
std::string GetCurrentValue()
{
std::string val;
- val.assign(&this->CurrentValue[0], this->CurrentValue.size());
+ if(this->CurrentValue.size())
+ {
+ val.assign(&this->CurrentValue[0], this->CurrentValue.size());
+ }
return val;
}