• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Révision6d7fe3af5aa2895bab0d4418fe5561fe15377820 (tree)
l'heure2022-01-16 20:45:03
AuteurBram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Message de Log

patch 8.2.4106: going over the end of the w_lines array

Commit: https://github.com/vim/vim/commit/fa1a45705995f16ee7e69434c772107a3ddeeebd
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 16 11:42:20 2022 +0000

patch 8.2.4106: going over the end of the w_lines array
Problem: Going over the end of the w_lines array.
Solution: Break out of the loop when "idx" is too big. (issue https://github.com/vim/vim/issues/9540)

Change Summary

Modification

diff -r ebd3d5313ea6 -r 6d7fe3af5aa2 src/drawscreen.c
--- a/src/drawscreen.c Sun Jan 16 12:30:05 2022 +0100
+++ b/src/drawscreen.c Sun Jan 16 12:45:03 2022 +0100
@@ -2539,6 +2539,11 @@
25392539 eof = TRUE;
25402540 break;
25412541 }
2542+
2543+ // Safety check: if any of the wl_size values is wrong we might go over
2544+ // the end of w_lines[].
2545+ if (idx >= Rows)
2546+ break;
25422547 }
25432548
25442549 // End of loop over all window lines.
diff -r ebd3d5313ea6 -r 6d7fe3af5aa2 src/version.c
--- a/src/version.c Sun Jan 16 12:30:05 2022 +0100
+++ b/src/version.c Sun Jan 16 12:45:03 2022 +0100
@@ -751,6 +751,8 @@
751751 static int included_patches[] =
752752 { /* Add new patch number below this line */
753753 /**/
754+ 4106,
755+/**/
754756 4105,
755757 /**/
756758 4104,
Afficher sur ancien navigateur de dépôt.