Skip to content

Buffer Overflow on screen.c#6308

Closed
Thiago4532 wants to merge 1 commit into
kovidgoyal:masterfrom
Thiago4532:buffer-overflow-fix
Closed

Buffer Overflow on screen.c#6308
Thiago4532 wants to merge 1 commit into
kovidgoyal:masterfrom
Thiago4532:buffer-overflow-fix

Conversation

@Thiago4532

Copy link
Copy Markdown

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
Copy Markdown
Author

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

@kovidgoyal

kovidgoyal commented May 28, 2023 via email

Copy link
Copy Markdown
Owner

@kovidgoyal

kovidgoyal commented May 28, 2023 via email

Copy link
Copy Markdown
Owner

@Thiago4532

Copy link
Copy Markdown
Author

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

@kovidgoyal

Copy link
Copy Markdown
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
zchee pushed a commit to zchee/kitty that referenced this pull request Jul 8, 2026
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