Fix out of bounds memory access when setting motif window hint properties

Commit b4bd5f9df3 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>
This commit is contained in:
Simon Hausmann 2018-10-24 17:13:57 +02:00
parent a87f85dbf9
commit ae57e271e8

View File

@ -904,6 +904,8 @@ void QXcbWindow::doFocusOut()
struct QtMotifWmHints {
quint32 flags, functions, decorations;
qint32 input_mode; // unused
quint32 status; // unused
};
enum {