From 132c40a8a89f701bc4cf4de8a716b5d02233d151 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 5 Nov 2013 07:39:45 -0500 Subject: [PATCH] cmake: Validate -E cmake_autogen argument count (#14545) Do not access an argument index not known to exist. Port the change from commit 9ef66f2b (cmake: Validate -E cmake_automoc argument count, 2013-11-05) to the new location of the code. --- Source/cmcmd.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 26251b3e6..d4f464cc3 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -632,7 +632,7 @@ int cmcmd::ExecuteCMakeCommand(std::vector& args) { return cmcmd::ExecuteEchoColor(args); } - else if (args[1] == "cmake_autogen") + else if (args[1] == "cmake_autogen" && args.size() >= 4) { cmQtAutoGenerators autogen; const char *config = args[3].empty() ? 0 : args[3].c_str();