Skip to content

Buffer Overflow on screen.c #6308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Buffer Overflow on screen.c #6308

wants to merge 1 commit into from

Conversation

Thiago4532
Copy link

This PR closes the issue #6306.

There is a buffer overflow on the function screen_dirty_line_graphics.

This function loops from [top, bottom] inclusive, but the function screen_erase_in_display calls screen_dirty_line_graphics for the range [cursor, num_lines], causing a buffer overflow on linebuf->line_attrs.

Checking the value of how before calling the functions solves the issue, the other calls to screen_dirty_line_graphics seems fine.

@Thiago4532
Copy link
Author

I made a mistake on the previous fix, now it should be good!

@kovidgoyal
Copy link
Owner

kovidgoyal commented May 28, 2023 via email

@kovidgoyal
Copy link
Owner

kovidgoyal commented May 28, 2023 via email

@Thiago4532
Copy link
Author

I thought about that too! Happy that was fixed! The glitches on my terminal were so annoying, thanks! :)

@kovidgoyal
Copy link
Owner

Thanks for tracking down the issue, saved me some time and headache.

@Thiago4532 Thiago4532 deleted the buffer-overflow-fix branch May 29, 2023 23:49
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