From 9ef66f2b0fc86e1a4c2ae532cbb32db137ef5ffe Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 5 Nov 2013 07:37:23 -0500 Subject: [PATCH] cmake: Validate -E cmake_automoc argument count (#14545) Do not access an argument index not known to exist. --- Source/cmake.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 290aff05c..14ddc1b01 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1734,7 +1734,7 @@ int cmake::ExecuteCMakeCommand(std::vector& 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();