From 93e302211eff82632a16494b4a0fe89bf7d46ea9 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sat, 26 Dec 2015 17:36:58 +0100 Subject: [PATCH] src/gui/imageinfo.cpp fix heap-use-after-free --- src/gui/imageinfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/imageinfo.cpp b/src/gui/imageinfo.cpp index 4bee68b10..919ec0432 100644 --- a/src/gui/imageinfo.cpp +++ b/src/gui/imageinfo.cpp @@ -249,8 +249,8 @@ void CImageInfo::InitInfoData() #ifdef IMAGE_VERSION version_string = IMAGE_VERSION; #else - const char * _version = config.getString("version", "U000000000000000").c_str(); - static CFlashVersionInfo versionInfo(_version); + std::string _version = config.getString("version", "U000000000000000").c_str(); + static CFlashVersionInfo versionInfo(_version.c_str()); version_string = versionInfo.getReleaseCycle(); version_string += " ";