diff options
author | Francisco Facioni <fran6co@gmail.com> | 2020-03-20 11:10:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-03-20 12:38:31 (GMT) |
commit | ecc0086bfc754f5adc4e496ae025da4bb1796490 (patch) | |
tree | 902454d6089765e46eb6d1ddcbd4bafb1d618390 /Source/QtDialog | |
parent | e3185e3d1b92a95c18f22f70b3cef6944dd019eb (diff) | |
download | CMake-ecc0086bfc754f5adc4e496ae025da4bb1796490.zip CMake-ecc0086bfc754f5adc4e496ae025da4bb1796490.tar.gz CMake-ecc0086bfc754f5adc4e496ae025da4bb1796490.tar.bz2 |
cmake-gui: Fix use-after-free in Open-possible check
Fix `QCMake::checkOpenPossible` to copy `toLocal8Bit().data()` before
its lifetime expires.
Diffstat (limited to 'Source/QtDialog')
-rw-r--r-- | Source/QtDialog/QCMake.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index 3b5dc04..a9089e5 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -486,7 +486,7 @@ void QCMake::setWarnUnusedMode(bool value) void QCMake::checkOpenPossible() { - auto data = this->BinaryDirectory.toLocal8Bit().data(); + std::string data = this->BinaryDirectory.toLocal8Bit().data(); auto possible = this->CMakeInstance->Open(data, true); emit openPossible(possible); } |