]> git.mdlowis.com Git - proto/labwc.git/commit
menu: fix UAFs in menu_destroy() and item_destroy()
authortokyo4j <hrak1529@gmail.com>
Thu, 14 Nov 2024 09:16:43 +0000 (18:16 +0900)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Thu, 14 Nov 2024 15:32:54 +0000 (16:32 +0100)
commitf8ed199197dd68de3267f5c1429b481f60f4ef72
treea168e94c4b2fdd0137963e46e54db027e6d82734
parent22eefa32a2914ac80a042f748553b5bcb1a962d9
menu: fix UAFs in menu_destroy() and item_destroy()

This fixes use-after-free when there's only 1 desktop and
menu_hide_submenu() is called to delete "Workspaces" submenu in
client-menu before menu scenes are initialized.

As menu_create() and item_create() no longer initialize scenes after
76515316, menu->scene_tree and item->tree should be null-checked.
src/menu/menu.c