Skip to content

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

Merged
psychonic merged 4 commits into
alliedmodders:masterfrom
Mikusch:menu-handle-root
Aug 24, 2026
Merged

Fix crash when deleting a Menu handle during callbacks#2536
psychonic merged 4 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

@psychonic
psychonic merged commit 61dea38 into alliedmodders:master Aug 24, 2026
4 checks passed
@Mikusch
Mikusch deleted the menu-handle-root branch August 24, 2026 19:56
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

2 participants