Patch 8.2.4106

3 views
Skip to first unread message

Bram Moolenaar

unread,
Jan 16, 2022, 6:55:19 AM1/16/22
to vim...@googlegroups.com

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 -- 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