diff options
author | Brad King <brad.king@kitware.com> | 2010-08-27 14:06:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-08-27 14:10:02 (GMT) |
commit | 4746365e0312693b754e59f51e692285c046fa89 (patch) | |
tree | a32af45812e99209a038eec36ef36b70a8398338 /Source/kwsys/SystemTools.cxx | |
parent | d8ccd1760c39ba836dc8daf3c0ea4f313be663cc (diff) | |
download | CMake-4746365e0312693b754e59f51e692285c046fa89.zip CMake-4746365e0312693b754e59f51e692285c046fa89.tar.gz CMake-4746365e0312693b754e59f51e692285c046fa89.tar.bz2 |
KWSys: Avoid empty string dereference in SplitString
Diffstat (limited to 'Source/kwsys/SystemTools.cxx')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index bcdb193..5002a06 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -1405,6 +1405,10 @@ kwsys_stl::vector<kwsys::String> SystemTools::SplitString(const char* p, char se { kwsys_stl::string path = p; kwsys_stl::vector<kwsys::String> paths; + if(path.empty()) + { + return paths; + } if(isPath && path[0] == '/') { path.erase(path.begin()); |