Commit 9ef66f2b authored by Brad King's avatar Brad King
Browse files

cmake: Validate -E cmake_automoc argument count (#14545)

Do not access an argument index not known to exist.
parent c515dc57
......@@ -1734,7 +1734,7 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args)
{
return cmake::ExecuteEchoColor(args);
}
else if (args[1] == "cmake_automoc")
else if (args[1] == "cmake_automoc" && args.size() >= 4)
{
cmQtAutomoc automoc;
const char *config = args[3].empty() ? 0 : args[3].c_str();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment