Mercurial > vim
changeset 29286:45af13649a34 v8.2.5160
patch 8.2.5160: accessing invalid memory after changing terminal size
Commit: https://github.com/vim/vim/commit/e178af5a586ea023622d460779fdcabbbfac0908
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jun 25 19:54:09 2022 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 25 Jun 2022 21:00:03 +0200 |
parents | 729a7c00fabc |
children | 8382479d5631 |
files | src/term.c src/version.c |
diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/term.c +++ b/src/term.c @@ -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; } /*