diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2020-05-25 15:20:15 -0400 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2020-05-25 15:20:15 -0400 |
| commit | 35566d6f9d283c5e2cbca531211273964059906f (patch) | |
| tree | 8dd3f7cb92d671b4d8f88e085c078d5510b952a9 | |
| parent | 8f3299e7fa7eee1d2ef595ad8875195350f64af3 (diff) | |
input/cursor: fix heap-buffer overflow in constraint set_region
Fixes #5383, caused by an oversight in 263827c.
| -rw-r--r-- | sway/input/cursor.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 8de7d950..7b094d85 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -831,8 +831,12 @@ static void handle_constraint_commit(struct wl_listener *listener, static void handle_pointer_constraint_set_region(struct wl_listener *listener, void *data) { - struct sway_cursor *cursor = - wl_container_of(listener, cursor, constraint_commit); + struct sway_pointer_constraint *sway_constraint = + wl_container_of(listener, sway_constraint, set_region); + struct wlr_pointer_constraint_v1 *constraint = data; + struct sway_seat *seat = constraint->seat->data; + struct sway_cursor *cursor = seat->cursor; + cursor->active_confine_requires_warp = true; } |
