From a39e9e9f394cc095f9d2db51fc2641c90814412d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Wed, 11 Jan 2023 14:48:56 -0500 Subject: [PATCH] utilsadapter: avoir use-after-free from ASAN Change-Id: Ic3328ea069af093d412abd7fea29a2df199c1052 --- src/app/utilsadapter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/utilsadapter.cpp b/src/app/utilsadapter.cpp index 76cfd5c99..49d6c2a01 100644 --- a/src/app/utilsadapter.cpp +++ b/src/app/utilsadapter.cpp @@ -478,7 +478,7 @@ UtilsAdapter::supportedLang() for (const auto& f : trFiles) { auto match = regex.indexIn(f); if (regex.capturedTexts().size() == 2) { - const auto& l = regex.capturedTexts()[1]; + auto l = regex.capturedTexts()[1]; auto nativeName = QLocale(l).nativeLanguageName(); if (nativeName.isEmpty()) // If a locale doesn't have any nativeLanguageName, ignore it. continue; @@ -693,7 +693,6 @@ UtilsAdapter::useApplicationTheme() return isSystemThemeDark(); } - bool UtilsAdapter::hasNativeDarkTheme() const { -- GitLab