mirror of
https://github.com/reactos/CMake.git
synced 2024-11-25 04:29:52 +00:00
KWSys: Avoid empty string dereference in SplitString
This commit is contained in:
parent
d8ccd1760c
commit
4746365e03
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user