diff options
author | Brad King <brad.king@kitware.com> | 2010-12-02 19:25:10 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2010-12-02 19:25:10 (GMT) |
commit | 6a07b22bf9d9f3b8384270d4a458238f370f734f (patch) | |
tree | b6fb6158a2c0a9f7365d47425e85ace406b2feef /Source | |
parent | 9ab26594872350487ba6994808316a208075cf0a (diff) | |
parent | 183d261b116decd6ab09a7d1a522a9ad4add47b4 (diff) | |
download | CMake-6a07b22bf9d9f3b8384270d4a458238f370f734f.zip CMake-6a07b22bf9d9f3b8384270d4a458238f370f734f.tar.gz CMake-6a07b22bf9d9f3b8384270d4a458238f370f734f.tar.bz2 |
Merge topic 'find-command-crash'
183d261 Fix find_* argument parsing crash (#11513)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmFindBase.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index 0416538..d0fe99f 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -164,6 +164,11 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn) } } } + if(args.size() < 2 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } this->VariableName = args[0]; if(this->CheckForVariableInCache()) { |