File 0001-xcb-check-validity-of-RandR-output-info-before-using-it.patch of Package libqt5-qtbase.40462
From aafa293fa0e15891d7568021da918d912338ef03 Mon Sep 17 00:00:00 2001
From: Liang Qi <liang.qi@qt.io>
Date: Mon, 16 Sep 2024 11:14:15 +0200
Subject: [PATCH] xcb: check validity of RandR output info before using it
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes: QTBUG-128906
Pick-to: 6.8 6.7 6.5 6.2 5.15
Change-Id: Ibafdf4bb9c449b29437b0520299ab407238e5703
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 439e19be17b9169f5786b2593e6d1ac6978bb84b)
---
src/plugins/platforms/xcb/qxcbconnection_screens.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/platforms/xcb/qxcbconnection_screens.cpp b/src/plugins/platforms/xcb/qxcbconnection_screens.cpp
index ec099101f5a..9cee3bc5e16 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_screens.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_screens.cpp
@@ -165,7 +165,7 @@ void QXcbConnection::updateScreens(const xcb_randr_notify_event_t *event)
// Screen has been disabled
auto outputInfo = Q_XCB_REPLY(xcb_randr_get_output_info, xcb_connection(),
output.output, output.config_timestamp);
- if (outputInfo->crtc == XCB_NONE) {
+ if (!outputInfo || outputInfo->crtc == XCB_NONE) {
qCDebug(lcQpaScreen) << "output" << screen->name() << "has been disabled";
destroyScreen(screen);
} else {
--
GitLab