• Brad King's avatar
    cmake: Fix read-after-free while checking command-line arguments · 23ffb72a
    Brad King authored
    Since commit v2.8.12~300^2~1 (CLI: Suppress the unused warning if the
    key value pair is cached, 2013-05-16), cmake::SetCacheArgs saves a
    cachedValue pointer and may cause the memory to be freed (by setting the
    cache entry) before reading it again.  Fix this by saving the old value
    in a separate string.
cmake.cxx 79.7 KB