Skip to content

Fix crash when deleting a Menu handle during callbacks - #2536

Open
Mikusch wants to merge 3 commits into
alliedmodders:masterfrom
Mikusch:menu-handle-root
Open

Fix crash when deleting a Menu handle during callbacks#2536
Mikusch wants to merge 3 commits into
alliedmodders:masterfrom
Mikusch:menu-handle-root

Conversation

@Mikusch

@Mikusch Mikusch commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Fixes a crash when deleting a Menu handle during MenuAction_Cancel, MenuAction_VoteCancel and MenuAction_VoteEnd, which would result in a UAF. It now invalidates the handle properly.
The same applies to MenuAction_Display, MenuAction_DrawItem and MenuAction_DisplayItem while paging through a menu.

Also fixes a crash when CancelVote() is called from MenuAction_VoteStart, and removes the duplicated AutoHandleRooter struct.

Closes #2073

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CreateMenuEx, ..., DisplayMenu crash @ player disconnection # 1.12.0.7066

1 participant