diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-10-24 17:13:57 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-10-25 12:28:36 +0000 |
commit | ae57e271e8d37c05cede83ada594b0f58d388a58 (patch) | |
tree | f5999ab4bccf5f9cb96cfcb601eb45b2c457afc0 /src/plugins/platforms/xcb | |
parent | a87f85dbf9bd1ea90936bd9a4609229edb15c264 (diff) |
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 <gatis.paeglis@qt.io>
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbwindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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 { |