[Cmake-commits] CMake branch, next, updated. v2.8.5-1803-ge1184c9

Brad King brad.king at kitware.com
Fri Sep 2 11:20:45 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  e1184c9a3418e3237b5e3712143591ae56f1d5ec (commit)
       via  d1751fbf17d2c0e945f696b920fe0cf2a8ad14b2 (commit)
       via  4868921bc2b5ad85221d51d585bb2116a2826915 (commit)
       via  f47393c66bb1810a9916fa755bc5830fb9d24d63 (commit)
      from  7f0543ad5c134094fca4c7600a681c2d41488ad0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e1184c9a3418e3237b5e3712143591ae56f1d5ec
commit e1184c9a3418e3237b5e3712143591ae56f1d5ec
Merge: 7f0543a d1751fb
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 2 11:20:41 2011 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Sep 2 11:20:41 2011 -0400

    Merge topic 'fix-errors-from-cppcheck-issue-12440' into next
    
    d1751fb ccmake: Fix off-by-one memory access error
    4868921 Fix file() command descriptor leak on error
    f47393c CTest: Fix memory leaks on error


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d1751fbf17d2c0e945f696b920fe0cf2a8ad14b2
commit d1751fbf17d2c0e945f696b920fe0cf2a8ad14b2
Author:     Thomas Jarosch <thomas.jarosch at intra2net.com>
AuthorDate: Thu Sep 1 21:59:57 2011 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 2 11:15:40 2011 -0400

    ccmake: Fix off-by-one memory access error
    
    Credit goes to "cppcheck".
    
    Signed-off-by: Thomas Jarosch <thomas.jarosch at intra2net.com>

diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx
index 1c48d8c..0e2cd22 100644
--- a/Source/CursesDialog/cmCursesLongMessageForm.cxx
+++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx
@@ -68,7 +68,7 @@ void cmCursesLongMessageForm::UpdateStatusBar()
     }
   else
     {
-    width = cmCursesMainForm::MAX_WIDTH;
+    width = cmCursesMainForm::MAX_WIDTH-1;
     }
 
   bar[width] = '\0';

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4868921bc2b5ad85221d51d585bb2116a2826915
commit 4868921bc2b5ad85221d51d585bb2116a2826915
Author:     Thomas Jarosch <thomas.jarosch at intra2net.com>
AuthorDate: Thu Sep 1 21:57:30 2011 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 2 11:15:26 2011 -0400

    Fix file() command descriptor leak on error
    
    Credit goes to "cppcheck".
    
    Signed-off-by: Thomas Jarosch <thomas.jarosch at intra2net.com>

diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 9a3de9b..3b63906 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2982,6 +2982,7 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
     std::string errStr = "UPLOAD cannot stat file '";
     errStr += filename + "'.";
     this->SetError(errStr.c_str());
+    fclose(fin);
     return false;
     }
 
@@ -2991,6 +2992,7 @@ cmFileCommand::HandleUploadCommand(std::vector<std::string> const& args)
   if(!curl)
     {
     this->SetError("UPLOAD error initializing curl.");
+    fclose(fin);
     return false;
     }
 

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f47393c66bb1810a9916fa755bc5830fb9d24d63
commit f47393c66bb1810a9916fa755bc5830fb9d24d63
Author:     Thomas Jarosch <thomas.jarosch at intra2net.com>
AuthorDate: Thu Sep 1 21:56:53 2011 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 2 11:15:11 2011 -0400

    CTest: Fix memory leaks on error
    
    Credit goes to "cppcheck".
    
    Signed-off-by: Thomas Jarosch <thomas.jarosch at intra2net.com>

diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index 60695da..81f18b0 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -93,6 +93,7 @@ void cmCTestRunTest::CompressOutput()
   ret = deflateInit(&strm, -1); //default compression level
   if (ret != Z_OK)
     {
+    delete[] out;
     return;
     }
 
@@ -106,6 +107,7 @@ void cmCTestRunTest::CompressOutput()
     {
     cmCTestLog(this->CTest, ERROR_MESSAGE, "Error during output "
       "compression. Sending uncompressed output." << std::endl);
+    delete[] out;
     return;
     }
 
diff --git a/Source/CTest/cmParsePHPCoverage.cxx b/Source/CTest/cmParsePHPCoverage.cxx
index 32c1ec1..593b2d1 100644
--- a/Source/CTest/cmParsePHPCoverage.cxx
+++ b/Source/CTest/cmParsePHPCoverage.cxx
@@ -159,6 +159,7 @@ bool cmParsePHPCoverage::ReadFileInformation(std::ifstream& in)
     // read open quote
     if(in.get(c) && c != '"')
       {
+      delete[] s;
       return false;
       }
     // read the string data
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 75a564e..702ba10 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -3096,6 +3096,7 @@ bool cmCTest::CompressString(std::string& str)
   ret = deflateInit(&strm, -1); //default compression level
   if (ret != Z_OK)
     {
+    delete[] out;
     return false;
     }
 
@@ -3109,6 +3110,7 @@ bool cmCTest::CompressString(std::string& str)
     {
     cmCTestLog(this, ERROR_MESSAGE, "Error during gzip compression."
       << std::endl);
+    delete[] out;
     return false;
     }
 

-----------------------------------------------------------------------

Summary of changes:
 Source/CTest/cmCTestRunTest.cxx                 |    2 ++
 Source/CTest/cmParsePHPCoverage.cxx             |    1 +
 Source/CursesDialog/cmCursesLongMessageForm.cxx |    2 +-
 Source/cmCTest.cxx                              |    2 ++
 Source/cmFileCommand.cxx                        |    2 ++
 5 files changed, 8 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list