Repository :
https://github.com/colorer/Colorer-library
On branch : master
Link :
https://github.com/colorer/Colorer-library/commit/6678cd80463c26e506c2dd3902052bee06c93070
>---------------------------------------------------------------
commit 6678cd80463c26e506c2dd3902052bee06c93070
Author: exkrexpexfex <
75270873+e...@users.noreply.github.com>
Date: Sun Aug 24 02:46:19 2025 +0300
Fix crash on use after free
>---------------------------------------------------------------
6678cd80463c26e506c2dd3902052bee06c93070
src/colorer/parsers/ParserFactoryImpl.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/colorer/parsers/ParserFactoryImpl.cpp b/src/colorer/parsers/ParserFactoryImpl.cpp
index 14b95af..053cf95 100644
--- a/src/colorer/parsers/ParserFactoryImpl.cpp
+++ b/src/colorer/parsers/ParserFactoryImpl.cpp
@@ -296,8 +296,9 @@ void ParserFactory::Impl::fillMapper(const UnicodeString& classID, const Unicode
{
const UnicodeString* name_id;
const UnicodeString name_default(HrdNameDefault);
+ uUnicodeString hrd;
if (nameID == nullptr) {
- auto hrd = colorer::Environment::getOSEnv("COLORER_HRD");
+ hrd = colorer::Environment::getOSEnv("COLORER_HRD");
if (hrd) {
name_id = hrd.get();
}