[mutter] backends/x11: Don't try to read more button states than there are
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] backends/x11: Don't try to read more button states than there are
- Date: Sat, 13 Mar 2021 15:59:56 +0000 (UTC)
commit 335a85ab849c25fad4ead8fc69d207ef4abed986
Author: Sebastian Keller <skeller gnome org>
Date: Thu Feb 11 15:42:00 2021 +0100
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>
src/backends/x11/meta-seat-x11.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/backends/x11/meta-seat-x11.c b/src/backends/x11/meta-seat-x11.c
index 7ed00307f4..6ae6f5f3b5 100644
--- a/src/backends/x11/meta-seat-x11.c
+++ b/src/backends/x11/meta-seat-x11.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]