ENH: fix crash when glob has wrong number of arguments
This commit is contained in:
parent
f372c0f552
commit
8033e32203
|
@ -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()) )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue