summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestTestHandler.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-08 19:57:41 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-01-08 19:57:41 (GMT)
commitdc451574c67da688024d5f3686c7c2aa4c5040ba (patch)
tree407db74b018131fee19cc6340d008490f3b1f733 /Source/CTest/cmCTestTestHandler.cxx
parent9bb7f8f8982d1d73ca4d4ee108f3f2505e01ee7e (diff)
parent0bdd4ebfb8303cc46e4a8bbe16f6c7bcc7108e2a (diff)
downloadCMake-dc451574c67da688024d5f3686c7c2aa4c5040ba.zip
CMake-dc451574c67da688024d5f3686c7c2aa4c5040ba.tar.gz
CMake-dc451574c67da688024d5f3686c7c2aa4c5040ba.tar.bz2
Merge topic 'base64-casts'
0bdd4ebf cmCTest: Use size_t for cmsysBase64_Encode return value a9fae8ac CTest: Fix integer overflow when uploading huge files
Diffstat (limited to 'Source/CTest/cmCTestTestHandler.cxx')
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index b77825d..38ce3dc 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1976,9 +1976,8 @@ std::string cmCTestTestHandler::GenerateRegressionImages(
= new unsigned char [ static_cast<int>(
static_cast<double>(len) * 1.5 + 5.0) ];
- unsigned long rlen
+ size_t rlen
= cmsysBase64_Encode(file_buffer, len, encoded_buffer, 1);
- unsigned long cc;
ostr
<< "\t\t\t<NamedMeasurement"
@@ -1988,7 +1987,7 @@ std::string cmCTestTestHandler::GenerateRegressionImages(
<< measurementfile.match(4) << "\""
<< " encoding=\"base64\""
<< ">" << std::endl << "\t\t\t\t<Value>";
- for ( cc = 0; cc < rlen; cc ++ )
+ for (size_t cc = 0; cc < rlen; cc ++ )
{
ostr << encoded_buffer[cc];
if ( cc % 60 == 0 && cc )