Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kidletime for openSUSE:Factory 
checked in at 2022-04-02 18:20:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kidletime (Old)
 and      /work/SRC/openSUSE:Factory/.kidletime.new.1900 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kidletime"

Sat Apr  2 18:20:08 2022 rev:101 rq:965487 version:5.92.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kidletime/kidletime.changes      2022-03-14 
19:35:57.574046760 +0100
+++ /work/SRC/openSUSE:Factory/.kidletime.new.1900/kidletime.changes    
2022-04-02 18:20:14.370477855 +0200
@@ -1,0 +2,6 @@
+Mon Mar 28 14:43:07 UTC 2022 - Christophe Giboudeaux <christo...@krop.fr>
+
+- Add upstream fix (kde#451946):
+  * 0001-Fixed-crash-during-KIdleTime-timeoutReached.patch
+
+-------------------------------------------------------------------

New:
----
  0001-Fixed-crash-during-KIdleTime-timeoutReached.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kidletime.spec ++++++
--- /var/tmp/diff_new_pack.vcvcq4/_old  2022-04-02 18:20:15.710462814 +0200
+++ /var/tmp/diff_new_pack.vcvcq4/_new  2022-04-02 18:20:15.718462724 +0200
@@ -36,6 +36,8 @@
 Source1:        %{name}-%{version}.tar.xz.sig
 Source2:        frameworks.keyring
 %endif
+# PATCH-FIX-UPSTREAM
+Patch0:         0001-Fixed-crash-during-KIdleTime-timeoutReached.patch
 BuildRequires:  extra-cmake-modules >= %{_kf5_bugfix_version}
 BuildRequires:  fdupes
 BuildRequires:  kf5-filesystem

++++++ 0001-Fixed-crash-during-KIdleTime-timeoutReached.patch ++++++
>From cd5040684723b87c7ba5b7cc1b1a63402902a641 Mon Sep 17 00:00:00 2001
From: Ada Christine <adachristin...@gmail.com>
Date: Sun, 27 Mar 2022 01:29:09 +0000
Subject: [PATCH] Fixed crash during KIdleTime::timeoutReached()

timeoutReached() will cause a crash if an item is removed from associations
during signal dispatch due to iterator invalidation. iterate over a
const container of the assoication keys only triggering ones matching
the current timeout value to avoid the crash and unnecessary copying

BUG: 451946
---
 src/kidletime.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/kidletime.cpp b/src/kidletime.cpp
index a58eaa6..0929285 100644
--- a/src/kidletime.cpp
+++ b/src/kidletime.cpp
@@ -288,13 +288,13 @@ void KIdleTimePrivate::timeoutReached(int msec)
 {
     Q_Q(KIdleTime);
 
-    for (auto it = associations.cbegin(); it != associations.cend(); ++it) {
-        if (it.value() == msec) {
+    const auto listKeys = associations.keys(msec);
+
+    for (const auto key : listKeys) {
 #if KIDLETIME_BUILD_DEPRECATED_SINCE(5, 76)
-            Q_EMIT q->timeoutReached(it.key());
+        Q_EMIT q->timeoutReached(key);
 #endif
-            Q_EMIT q->timeoutReached(it.key(), msec);
-        }
+        Q_EMIT q->timeoutReached(key, msec);
     }
 }
 
-- 
2.35.1

Reply via email to