summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-02-01 09:49:08 -0500
committerBrad King <brad.king@kitware.com>2016-02-01 10:05:10 -0500
commit6ffc4323670f3671f262b3e9f035f1ea3f714986 (patch)
tree4058de83fa61e55afe5b841534f4b268a97a758e /Source/cmGeneratorExpressionEvaluator.cxx
parent656768cffe981e02f12fe51d6723d21176a46329 (diff)
downloadcmake-6ffc4323670f3671f262b3e9f035f1ea3f714986.tar.gz
cmConditionEvaluator: Fix matching of `CMAKE_MATCH_*` values (#15944)
While evaluating `if(MATCHES)` we get a `const char*` pointer to the string to be matched. On code like if(CMAKE_MATCH_COUNT MATCHES "Y") the string to be matched may be owned by our own result variables. We must move the value to our own buffer before clearing them. Otherwise we risk reading freed storage.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
0 files changed, 0 insertions, 0 deletions