Accepting request 504427 from home:wolfi323:test
- Add xembedsniproxy-fix-possible-crash.patch to fix a possible crash OBS-URL: https://build.opensuse.org/request/show/504427 OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/plasma5-workspace?expand=0&rev=327
This commit is contained in:
parent
54007c6544
commit
be2631f985
@ -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
|
Tue Jun 13 21:35:01 CEST 2017 - fabian@ritter-vogt.de
|
||||||
|
|
||||||
|
@ -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
|
# 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
|
Patch1: 0001-Ignore-default-sddm-face-icons.patch
|
||||||
# PATCHES 100-200 and above are from upstream 5.10 branch
|
# 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
|
# PATCHES 201-300 and above are from upstream master/5.11 branch
|
||||||
BuildRequires: breeze5-icons
|
BuildRequires: breeze5-icons
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -209,6 +210,7 @@ workspace. Development files.
|
|||||||
%setup -q -n plasma-workspace-%{version}
|
%setup -q -n plasma-workspace-%{version}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch100 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake_kf5 -d build -- -DKDE4_COMMON_PAM_SERVICE=xdm -DKDE_DEFAULT_HOME=.kde4 -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir}
|
%cmake_kf5 -d build -- -DKDE4_COMMON_PAM_SERVICE=xdm -DKDE_DEFAULT_HOME=.kde4 -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir}
|
||||||
|
33
xembedsniproxy-fix-possible-crash.patch
Normal file
33
xembedsniproxy-fix-possible-crash.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From a17de5957d4ba0f07c77fa99860c9046ff8aa1be Mon Sep 17 00:00:00 2001
|
||||||
|
From: Wolfgang Bauer <wbauer@tmo.at>
|
||||||
|
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
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user