Skip to content

Free settingsfile result after showing prompt#87

Merged
Jacherr merged 1 commit into
Retro-Rewind-Team:mainfrom
y21:uaf
Apr 15, 2026
Merged

Free settingsfile result after showing prompt#87
Jacherr merged 1 commit into
Retro-Rewind-Team:mainfrom
y21:uaf

Conversation

@y21
Copy link
Copy Markdown
Collaborator

@y21 y21 commented Apr 15, 2026

Use-after-free bug I found while reviewing #86 (not introduced there, but the piece of code was moved around):

I haven't found this causing an actual visible issue in practice, but always good to remove use-after-free bugs.

On L206 we took the context string pointer and put it in the lines array. Then on L210 we (used to) free the result (along with the context string). Then on L212, after freeing the result and its context, we try to print the lines containing the context string.
Easy to fix by just swapping the two lines.

@Jacherr Jacherr merged commit d34d183 into Retro-Rewind-Team:main Apr 15, 2026
1 check failed
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