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, master has been updated
       via  c544545c6364ed7081d60772505278c9f199ecf8 (commit)
      from  0a6543d957463f0a7f7a585cc43468174c1204a0 (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=c544545c6364ed7081d60772505278c9f199ecf8
commit c544545c6364ed7081d60772505278c9f199ecf8
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Dec 15 15:45:09 2011 -0500
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Thu Dec 15 15:45:09 2011 -0500

    KWSys: Correctly handle empty environment variables
    
    Fix a crash which occurs when SystemTools::GetPath attempts to process
    an empty environment variable.
    
    Author: Vladimir Panteleev <vladi...@thecybershadow.net>

diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index ed7f62c..4d83293 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -326,7 +326,7 @@ void 
SystemTools::GetPath(kwsys_stl::vector<kwsys_stl::string>& path, const char
   kwsys_stl::string pathEnv = cpathEnv;
 
   // A hack to make the below algorithm work.
-  if(pathEnv[pathEnv.length()-1] != ':')
+  if(!pathEnv.empty() && pathEnv[pathEnv.length()-1] != pathSep[0])
     {
     pathEnv += pathSep;
     }

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

Summary of changes:
 Source/kwsys/SystemTools.cxx |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits

Reply via email to