mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-25 10:18:34 -06:00
ENH: fix crash when glob has wrong number of arguments
This commit is contained in:
@@ -233,6 +233,11 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args,
|
||||
}
|
||||
g.SetRelative(i->c_str());
|
||||
++i;
|
||||
if(i == args.end())
|
||||
{
|
||||
this->SetError("GLOB requires a glob expression after the directory");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user