Skip to content

tsd-ui: copy color ID before self-referential push_back#308

Merged
jeffamstutz merged 1 commit into
NVIDIA:next_releasefrom
tarcila:tsd-ui-use-after-free
Jun 10, 2026
Merged

tsd-ui: copy color ID before self-referential push_back#308
jeffamstutz merged 1 commit into
NVIDIA:next_releasefrom
tarcila:tsd-ui-use-after-free

Conversation

@tarcila

@tarcila tarcila commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

ImVector::push_back(m_colorIDs.back()) passed a reference into the same buffer push_back possibly reallocates.

ImVector::push_back(m_colorIDs.back()) passed a reference into the same
buffer push_back reallocates; reserve() freed it before the copy, a
use-after-free flagged by valgrind. Copy to a local first.
@tarcila tarcila changed the title fix(tsd-ui): copy color ID before self-referential push_back tsd-ui: copy color ID before self-referential push_back Jun 10, 2026
@tarcila tarcila requested a review from jeffamstutz June 10, 2026 13:44
@jeffamstutz

Copy link
Copy Markdown
Collaborator

Nice catch, thanks!

@jeffamstutz jeffamstutz merged commit 580f730 into NVIDIA:next_release Jun 10, 2026
12 checks passed
@tarcila tarcila deleted the tsd-ui-use-after-free branch June 10, 2026 14:28
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.

2 participants