To: vim_dev@googlegroups.com Subject: Patch 8.2.4106 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4106 Problem: Going over the end of the w_lines array. Solution: Break out of the loop when "idx" is too big. (issue #9540) Files: src/drawscreen.c *** ../vim-8.2.4105/src/drawscreen.c 2022-01-13 13:08:10.503904435 +0000 --- src/drawscreen.c 2022-01-16 11:41:04.412620379 +0000 *************** *** 2539,2544 **** --- 2539,2549 ---- eof = TRUE; break; } + + // Safety check: if any of the wl_size values is wrong we might go over + // the end of w_lines[]. + if (idx >= Rows) + break; } // End of loop over all window lines. *** ../vim-8.2.4105/src/version.c 2022-01-16 11:25:20.897661683 +0000 --- src/version.c 2022-01-16 11:41:46.372566311 +0000 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 4106, /**/ -- Computers are not intelligent. They only think they are. /// 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 ///