use upstreamed version of previous commit/patch

epel9
Rex Dieter 7 years ago
parent 32ef535e2c
commit 4956122fe0

@ -0,0 +1,50 @@
From 1c098f6efa9ce449bc94e71bf8e317e1d607c4f8 Mon Sep 17 00:00:00 2001
From: Maciej Sitarz <macieksitarz@wp.pl>
Date: Mon, 8 Jan 2018 15:01:11 +0000
Subject: [PATCH 13/13] Fix for xembedsniproxy crash due to NULL returned from
xcb_image_get()
Summary:
In my environment (Fedora 27, plasma-workspace-5.11.4-1.fc27.x86_64) xembedsniproxy crashes.
This is caused by NULL being returned by xcb_image_get().
This should fix or at least mitigate the problems from bugs:
https://bugs.kde.org/show_bug.cgi?id=355463
https://bugs.kde.org/show_bug.cgi?id=359664
https://bugzilla.redhat.com/show_bug.cgi?id=1497829
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D9732
---
xembed-sni-proxy/sniproxy.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/xembed-sni-proxy/sniproxy.cpp b/xembed-sni-proxy/sniproxy.cpp
index 7fb00dbb..932109d9 100644
--- a/xembed-sni-proxy/sniproxy.cpp
+++ b/xembed-sni-proxy/sniproxy.cpp
@@ -288,7 +288,13 @@ QImage SNIProxy::getImageNonComposite() const
xcb_image_t *image = xcb_image_get(c, m_windowId, 0, 0, geom->width, geom->height, 0xFFFFFFFF, XCB_IMAGE_FORMAT_Z_PIXMAP);
// Don't hook up cleanup yet, we may use a different QImage after all
- QImage naiveConversion = QImage(image->data, image->width, image->height, QImage::Format_ARGB32);
+ QImage naiveConversion;
+ if (image) {
+ naiveConversion = QImage(image->data, image->width, image->height, QImage::Format_ARGB32);
+ } else {
+ qCDebug(SNIPROXY) << "Skip NULL image returned from xcb_image_get() for" << m_windowId << Title();
+ return QImage();
+ }
if (isTransparentImage(naiveConversion)) {
QImage elaborateConversion = QImage(convertFromNative(image));
--
2.14.3

@ -1,17 +0,0 @@
--- plasma-workspace-5.11.4/xembed-sni-proxy/sniproxy.cpp_orig 2018-01-08 13:40:42.070485134 +0100
+++ plasma-workspace-5.11.4/xembed-sni-proxy/sniproxy.cpp 2018-01-08 13:42:03.734526387 +0100
@@ -288,7 +288,13 @@
xcb_image_t *image = xcb_image_get(c, m_windowId, 0, 0, geom->width, geom->height, 0xFFFFFFFF, XCB_IMAGE_FORMAT_Z_PIXMAP);
// Don't hook up cleanup yet, we may use a different QImage after all
- QImage naiveConversion = QImage(image->data, image->width, image->height, QImage::Format_ARGB32);
+ QImage naiveConversion;
+ if (nullptr != image) {
+ naiveConversion = QImage(image->data, image->width, image->height, QImage::Format_ARGB32);
+ } else {
+ qCDebug(SNIPROXY) << "Skip NULL image returned from xcb_image_get() for" << m_windowId << Title();
+ return QImage();
+ }
if (isTransparentImage(naiveConversion)) {
QImage elaborateConversion = QImage(convertFromNative(image));

@ -7,7 +7,7 @@
Name: plasma-workspace
Summary: Plasma workspace, applications and applets
Version: 5.11.4
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv2+
URL: https://cgit.kde.org/%{name}.git
@ -46,11 +46,11 @@ Patch102: startkde.patch
Patch105: plasma-workspace-5.7.3-folderview_layout.patch
## upstreamable Patches
Patch200: plasma-workspace-sni-proxy-crash.patch
## upstream Patches (5.9 branch) lookaside cache
## upstream Patches lookaside cache
## upstream Patches (master branch)
Patch13: 0013-Fix-for-xembedsniproxy-crash-due-to-NULL-returned-fr.patch
# udev
BuildRequires: zlib-devel
@ -360,6 +360,8 @@ BuildArch: noarch
%setup -q -a 20
## upstream patches
%patch13 -p1 -b .0013
%patch100 -p1 -b .konsole-in-contextmenu
# FIXME/TODO: it is unclear whether this is needed or even a good idea anymore -- rex
%if 0%{?default_lookandfeel:1}
@ -369,7 +371,6 @@ sed -i -e "s|@DEFAULT_LOOKANDFEEL@|%{?default_lookandfeel}%{!?default_lookandfee
%endif
%patch102 -p1 -b .startkde
%patch105 -p1
%patch200 -p1 -b .xembedsniproxy_crash
%if 0%{?fedora}
cp -a lookandfeel lookandfeel-fedora
@ -575,6 +576,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/{plasma-windowed,org.
%changelog
* Mon Jan 08 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.11.4-4
- use upstreamed version of previous commit/patch
* Mon Jan 08 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.11.4-3
- include candidate crash fix for xembedsniproxy (#1497829,kde#359664)

Loading…
Cancel
Save