]> git.mdlowis.com Git - proto/labwc.git/commit
layers.c: fix UAF bug on TTY change
authorJohan Malm <jgm323@gmail.com>
Sun, 29 Jun 2025 21:09:16 +0000 (22:09 +0100)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Sun, 29 Jun 2025 21:22:05 +0000 (23:22 +0200)
commite365d5eaf044216594ad64232a29b296a7e2eb96
tree60352941283605dbc8d2b27525ec87310b228e46
parentca01dcaa95f1cf482f3c8486e4c0d6c6ba1742ab
layers.c: fix UAF bug on TTY change

Call seat_set_focus_layer(seat, NULL) in node-destroy-handler to avoid
seat->focused_layer becoming invalid and causing UAF issues in certain
situations like when outputs (and therefore layer-trees) are destroyed.

Fixes: #2863
Helped-by: @Consolatis
src/layers.c