1
0
Fork 0

backends/x11: Don't try to read more button states than there are

This was causing an (inconsequential) invalid read.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1728>
This commit is contained in:
Sebastian Keller 2021-02-11 15:42:00 +01:00 committed by Marge Bot
parent 2744722b8c
commit 335a85ab84

View file

@ -1514,7 +1514,7 @@ translate_state (XIButtonState *button_state,
if (button_state)
{
for (i = 1; i <= button_state->mask_len * 8; i++)
for (i = 1; i < button_state->mask_len * 8; i++)
{
if (!XIMaskIsSet (button_state->mask, i))
continue;