From aee7e4a03b8b410212e2eae23d1ecc182c8da817 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Mon, 20 Oct 2014 12:17:19 -0400 Subject: 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. --- Source/cmCacheManager.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/cmCacheManager.cxx') 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 ]*$"); -- cgit v1.2.1