diff --git a/plasma5-workspace.changes b/plasma5-workspace.changes index e884e71..9689274 100644 --- a/plasma5-workspace.changes +++ b/plasma5-workspace.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Jun 17 17:36:55 UTC 2017 - wbauer@tmo.at + +- Add xembedsniproxy-fix-possible-crash.patch to fix a possible + crash + ------------------------------------------------------------------- Tue Jun 13 21:35:01 CEST 2017 - fabian@ritter-vogt.de diff --git a/plasma5-workspace.spec b/plasma5-workspace.spec index 83dd487..6901227 100644 --- a/plasma5-workspace.spec +++ b/plasma5-workspace.spec @@ -37,6 +37,7 @@ Patch0: 0001-Rename-qdbus-in-startkde.patch # PATCH-FIX-OPENSUSE 0001-Ignore-default-sddm-face-icons.patch boo#1001364 fabian@ritter-vogt.de -- Ignore default sddm face icons Patch1: 0001-Ignore-default-sddm-face-icons.patch # PATCHES 100-200 and above are from upstream 5.10 branch +Patch100: xembedsniproxy-fix-possible-crash.patch # PATCHES 201-300 and above are from upstream master/5.11 branch BuildRequires: breeze5-icons BuildRequires: fdupes @@ -209,6 +210,7 @@ workspace. Development files. %setup -q -n plasma-workspace-%{version} %patch0 -p1 %patch1 -p1 +%patch100 -p1 %build %cmake_kf5 -d build -- -DKDE4_COMMON_PAM_SERVICE=xdm -DKDE_DEFAULT_HOME=.kde4 -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir} diff --git a/xembedsniproxy-fix-possible-crash.patch b/xembedsniproxy-fix-possible-crash.patch new file mode 100644 index 0000000..7419511 --- /dev/null +++ b/xembedsniproxy-fix-possible-crash.patch @@ -0,0 +1,33 @@ +From a17de5957d4ba0f07c77fa99860c9046ff8aa1be Mon Sep 17 00:00:00 2001 +From: Wolfgang Bauer +Date: Sat, 17 Jun 2017 19:19:40 +0200 +Subject: [xembedsniproxy] Fix memleak and possible crash + +Check the return value of xcb_get_window_attributes_reply() to prevent a crash if getting the window attributes would fail for some reason. + +Also free the returned structure after usage to avoid memleaks. +This is necessary according to https://xcb.freedesktop.org/windowcontextandmanipulation (see the end of the page). + +Differential Revision: https://phabricator.kde.org/D6252 +--- + xembed-sni-proxy/sniproxy.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/xembed-sni-proxy/sniproxy.cpp b/xembed-sni-proxy/sniproxy.cpp +index 5974baf..b2f64fb 100644 +--- a/xembed-sni-proxy/sniproxy.cpp ++++ b/xembed-sni-proxy/sniproxy.cpp +@@ -209,8 +209,9 @@ SNIProxy::SNIProxy(xcb_window_t wid, QObject* parent): + //if the client does supports that we send directly, otherwise we'll use xtest + auto waCookie = xcb_get_window_attributes(c, wid); + auto windowAttributes = xcb_get_window_attributes_reply(c, waCookie, nullptr); +- if (! (windowAttributes->all_event_masks & XCB_EVENT_MASK_BUTTON_PRESS)) { ++ if (windowAttributes && ! (windowAttributes->all_event_masks & XCB_EVENT_MASK_BUTTON_PRESS)) { + m_injectMode = XTest; ++ free(windowAttributes); + } + + //there's no damage event for the first paint, and sometimes it's not drawn immediately +-- +cgit v0.11.2 +