diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-27 22:50:42 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-02-06 18:04:10 (GMT) |
commit | 803317aab622e4f12e7d342be5bbb4f16b088efd (patch) | |
tree | 17c44c30226619caf24ace2d9e3e2cc4e5b03908 /Source/cmSystemTools.cxx | |
parent | 11093a03e064e1b7ef2d5db28845b5da7b934806 (diff) | |
download | CMake-803317aab622e4f12e7d342be5bbb4f16b088efd.zip CMake-803317aab622e4f12e7d342be5bbb4f16b088efd.tar.gz CMake-803317aab622e4f12e7d342be5bbb4f16b088efd.tar.bz2 |
cmSystemTools: Early return if size makes later comparison false.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index b07dd78..bb007ef 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -366,6 +366,10 @@ bool cmSystemTools::IsInternallyOn(const char* val) return false; } std::basic_string<char> v = val; + if (v.size() > 4) + { + return false; + } for(std::basic_string<char>::iterator c = v.begin(); c != v.end(); c++) |