diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 2bfe6a3e2..86ec69aff 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -1549,7 +1549,7 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
<< "\t";
covSumFile.setf(std::ios::fixed, std::ios::floatfield);
covSumFile.precision(2);
- covSumFile << (percent_coverage/number_files)<< "\n"
+ covSumFile << SAFEDIV(percent_coverage,number_files)<< "\n"
<< "\t" << end_time << "\n";
covSumFile << "" <<
static_cast((cmSystemTools::GetTime() - elapsed_time_start)/6)/10.0