Patch 8.2.5160

5 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 25, 2022, 2:56:58 PM6/25/22
to vim...@googlegroups.com

Patch 8.2.5160
Problem: Accessing invalid memory after changing terminal size.
Solution: Adjust cmdline_row and msg_row to the value of Rows.
Files: src/term.c


<F5>
*** ../vim-8.2.5159/src/term.c 2022-06-19 17:45:22.389700287 +0100
--- src/term.c 2022-06-25 19:53:44.737230464 +0100
***************
*** 3366,3371 ****
--- 3366,3377 ----
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;
}

/*
*** ../vim-8.2.5159/src/version.c 2022-06-25 13:48:21.450699218 +0100
--- src/version.c 2022-06-25 19:49:30.901034255 +0100
***************
*** 737,738 ****
--- 737,740 ----
{ /* Add new patch number below this line */
+ /**/
+ 5160,
/**/

--
A)bort, R)etry, D)o it right this time

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages