summaryrefslogtreecommitdiff
path: root/Source/cmCacheManager.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-10-20 12:17:19 -0400
committerBen Boeckel <ben.boeckel@kitware.com>2014-10-20 12:17:19 -0400
commitaee7e4a03b8b410212e2eae23d1ecc182c8da817 (patch)
treef578048b76fed26906e2eb0b776197b72f9f9834 /Source/cmCacheManager.cxx
parent368e8de4cd5a5d97c9b5e81489bf014579211bda (diff)
downloadcmake-aee7e4a03b8b410212e2eae23d1ecc182c8da817.tar.gz
cmCacheManager: parse -D flags more strictly
In the case of: -DCACHE_VARS=-DEXTERNAL_PROJECT_CMAKE_ARG:BOOL=TRUE the variable is parsed out as: CACHE_VARS=-DEXTERNAL_PROJECT_CMAKE_ARG because the parser allows '=' in the variable name. Disallow such a name on the command line.
Diffstat (limited to 'Source/cmCacheManager.cxx')
-rw-r--r--Source/cmCacheManager.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index d6b84a0002..17bfe4b002 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -139,7 +139,7 @@ bool cmCacheManager::ParseEntry(const std::string& entry,
{
// input line is: key:type=value
static cmsys::RegularExpression reg(
- "^([^:]*):([^=]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$");
+ "^([^=:]*):([^=]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$");
// input line is: "key":type=value
static cmsys::RegularExpression regQuoted(
"^\"([^\"]*)\":([^=]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$");