summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2004-01-21 19:06:44 (GMT)
committerBrad King <brad.king@kitware.com>2004-01-21 19:06:44 (GMT)
commitcb95dde1e42569130d163be3f339fdeb08e63214 (patch)
tree0f059224581dd9a205e24178cbb93c00be6fcb3e /Source
parentd609e037b9a6bb733dd74970994bab62dccecd36 (diff)
downloadCMake-cb95dde1e42569130d163be3f339fdeb08e63214.zip
CMake-cb95dde1e42569130d163be3f339fdeb08e63214.tar.gz
CMake-cb95dde1e42569130d163be3f339fdeb08e63214.tar.bz2
BUG: Fixed buffer size in MakeXMLSafe.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmCTest.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index beceb41..5cc0728 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -208,7 +208,6 @@ static const char* cmCTestMemCheckResultStrings[] = {
std::string cmCTest::MakeXMLSafe(const std::string& str)
{
cmOStringStream ost;
- char buffer[10];
// By uncommenting the lcnt code, it will put newline every 120 characters
//int lcnt = 0;
for (std::string::size_type pos = 0; pos < str.size(); pos ++ )
@@ -216,6 +215,7 @@ std::string cmCTest::MakeXMLSafe(const std::string& str)
unsigned char ch = str[pos];
if ( (ch > 126 || ch < 32) && ch != 9 && ch != 10 && ch != 13 )
{
+ char buffer[33];
sprintf(buffer, "&lt;%d&gt;", (int)ch);
//sprintf(buffer, "&#x%0x;", (unsigned int)ch);
ost << buffer;