• Brad King's avatar
    cmConditionEvaluator: Fix matching of `CMAKE_MATCH_*` values (#15944) · 6ffc4323
    Brad King authored
    While evaluating `if(MATCHES)` we get a `const char*` pointer to the
    string to be matched.  On code like
    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.
MatchesSelf.cmake 95 Bytes