summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmFileCommand.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index b3bbb09..bbf4265 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -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()) )
{