0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.2.5160: accessing invalid memory after changing terminal size

Problem:    Accessing invalid memory after changing terminal size.
Solution:   Adjust cmdline_row and msg_row to the value of Rows.
This commit is contained in:
Bram Moolenaar
2022-06-25 19:54:09 +01:00
parent e1dc76fbf3
commit e178af5a58
2 changed files with 8 additions and 0 deletions

View File

@@ -3366,6 +3366,12 @@ check_shellsize(void)
if (Rows < min_rows()) // need room for one window and command line
Rows = min_rows();
limit_screen_size();
// make sure these values are not invalid
if (cmdline_row >= Rows)
cmdline_row = Rows - 1;
if (msg_row >= Rows)
msg_row = Rows - 1;
}
/*

View File

@@ -735,6 +735,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
5160,
/**/
5159,
/**/