summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmParseCoberturaCoverage.cxx
diff options
context:
space:
mode:
authorJonathan Beezley <jonathan.beezley@kitware.com>2014-10-03 17:51:14 (GMT)
committerBrad King <brad.king@kitware.com>2014-10-03 18:35:56 (GMT)
commit1c838addf590f8ae67e43f0eb02a6e02b46264f3 (patch)
treedac42fc7e7731f76e680a90c6669432091fea040 /Source/CTest/cmParseCoberturaCoverage.cxx
parent0e0cb710d03006920bef9d8746e0966a6e48e8fb (diff)
downloadCMake-1c838addf590f8ae67e43f0eb02a6e02b46264f3.zip
CMake-1c838addf590f8ae67e43f0eb02a6e02b46264f3.tar.gz
CMake-1c838addf590f8ae67e43f0eb02a6e02b46264f3.tar.bz2
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/cmParseCoberturaCoverage.cxx')
-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 6b98056..0742be1 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;