summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-12-02 19:25:10 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2010-12-02 19:25:10 (GMT)
commit6a07b22bf9d9f3b8384270d4a458238f370f734f (patch)
treeb6fb6158a2c0a9f7365d47425e85ace406b2feef /Source
parent9ab26594872350487ba6994808316a208075cf0a (diff)
parent183d261b116decd6ab09a7d1a522a9ad4add47b4 (diff)
downloadCMake-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.cxx5
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())
{