summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-05 12:37:23 (GMT)
committerBrad King <brad.king@kitware.com>2013-11-05 12:37:23 (GMT)
commit9ef66f2b0fc86e1a4c2ae532cbb32db137ef5ffe (patch)
tree4f81dfd2637bc5d3bb38eb6445c8679cfcb0ce3b /Source/cmake.cxx
parentc515dc574879448d66e2c5a27b9807d95a27fefd (diff)
downloadCMake-9ef66f2b0fc86e1a4c2ae532cbb32db137ef5ffe.zip
CMake-9ef66f2b0fc86e1a4c2ae532cbb32db137ef5ffe.tar.gz
CMake-9ef66f2b0fc86e1a4c2ae532cbb32db137ef5ffe.tar.bz2
cmake: Validate -E cmake_automoc argument count (#14545)
Do not access an argument index not known to exist.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 290aff0..14ddc1b 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -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();