1
0
Эх сурвалжийг харах

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.
Jonathan Beezley 11 жил өмнө
parent
commit
1c838addf5

+ 1 - 0
Source/CTest/cmParseCoberturaCoverage.cxx

@@ -71,6 +71,7 @@ protected:
           cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Reading file: "
           cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Reading file: "
                      << atts[tagCount+1]<< std::endl);
                      << atts[tagCount+1]<< std::endl);
           std::string filename = atts[tagCount+1];
           std::string filename = atts[tagCount+1];
+          this->CurFileName = "";
           for(size_t i=0;i < FilePaths.size();i++)
           for(size_t i=0;i < FilePaths.size();i++)
             {
             {
             finalpath = FilePaths[i] + "/" + filename;
             finalpath = FilePaths[i] + "/" + filename;