From ae57e271e8d37c05cede83ada594b0f58d388a58 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 24 Oct 2018 17:13:57 +0200 Subject: Fix out of bounds memory access when setting motif window hint properties Commit b4bd5f9df3e69da707513ba544537c80a8564fb4 removed two members from the mwm hints structure but told xcb_change_property that the structure has still five members when it had been reduced to three. This lead to xcb_change_property accessing memory out of bounds. As identified by Gatis, the safest option to avoid the access is to add the two members again. Other window managers may be expecting their presence in the window property. Change-Id: Id4f0c9536cd317c35f2c6ebd1ac9ccc6f72de6a5 Reviewed-by: Gatis Paeglis Reviewed-by: Mikhail Svetkin --- src/plugins/platforms/xcb/qxcbwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/platforms/xcb/qxcbwindow.cpp') diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index e56f6b13d8..70aab77a51 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -904,6 +904,8 @@ void QXcbWindow::doFocusOut() struct QtMotifWmHints { quint32 flags, functions, decorations; + qint32 input_mode; // unused + quint32 status; // unused }; enum { -- cgit v1.2.3