From 9ef66f2b0fc86e1a4c2ae532cbb32db137ef5ffe Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 5 Nov 2013 07:37:23 -0500 Subject: 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 290aff0..14ddc1b 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(); -- cgit v0.12 From 132c40a8a89f701bc4cf4de8a716b5d02233d151 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 5 Nov 2013 07:39:45 -0500 Subject: 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 26251b3..d4f464c 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(); -- cgit v0.12