summaryrefslogtreecommitdiff
path: root/Source/CTest
diff options
context:
space:
mode:
authorJonathan Beezley <jonathan.beezley@kitware.com>2014-10-03 13:51:14 -0400
committerBrad King <brad.king@kitware.com>2014-10-03 14:35:56 -0400
commit1c838addf590f8ae67e43f0eb02a6e02b46264f3 (patch)
treedac42fc7e7731f76e680a90c6669432091fea040 /Source/CTest
parent0e0cb710d03006920bef9d8746e0966a6e48e8fb (diff)
downloadcmake-1c838addf590f8ae67e43f0eb02a6e02b46264f3.tar.gz
cmParseCoberturaCoverage: Initialize CurFileName to empty string
When the file is not found in $CMAKE_SOURCE_DIR/<file path>, the CurFileName pointer remained set to the previous file. This caused the new file's coverage data to populate the into the wrong object giving incorrect results and occasionally resulting in a seg fault.
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmParseCoberturaCoverage.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/CTest/cmParseCoberturaCoverage.cxx b/Source/CTest/cmParseCoberturaCoverage.cxx
index 6b98056320..0742be172b 100644
--- a/Source/CTest/cmParseCoberturaCoverage.cxx
+++ b/Source/CTest/cmParseCoberturaCoverage.cxx
@@ -71,6 +71,7 @@ protected:
cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Reading file: "
<< atts[tagCount+1]<< std::endl);
std::string filename = atts[tagCount+1];
+ this->CurFileName = "";
for(size_t i=0;i < FilePaths.size();i++)
{
finalpath = FilePaths[i] + "/" + filename;