From 1c838addf590f8ae67e43f0eb02a6e02b46264f3 Mon Sep 17 00:00:00 2001 From: Jonathan Beezley Date: Fri, 3 Oct 2014 13:51:14 -0400 Subject: cmParseCoberturaCoverage: Initialize CurFileName to empty string When the file is not found in $CMAKE_SOURCE_DIR/, 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. --- Source/CTest/cmParseCoberturaCoverage.cxx | 1 + 1 file changed, 1 insertion(+) 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; -- cgit v0.12