To: vim_dev@googlegroups.com Subject: Patch 8.2.5160 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 *** ../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 -- Bram@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 ///