mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-27 21:58:16 +01:00
input/cursor: fix heap-buffer overflow in constraint set_region
Fixes #5383, caused by an oversight in 6f0a0bd
.
This commit is contained in:
parent
5d13f647f9
commit
34e0cad9ac
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue