• R/O
  • SSH

vim: Commit

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


Commit MetaInfo

Révision4e48651f2e48c660d641c9a7f4426a7c4973ffea (tree)
l'heure2022-07-02 20:15:02
AuteurBram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Message de Log

patch 9.0.0024: may access part of typeahead buf that isn't filled

Commit: https://github.com/vim/vim/commit/af043e12d9e5869c597de40b9a2517ae97ac72e7
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 2 12:08:16 2022 +0100

patch 9.0.0024: may access part of typeahead buf that isn't filled
Problem: May access part of typeahead buf that isn't filled.
Solution: Check length of typeahead.

Change Summary

Modification

diff -r cffb457247f4 -r 4e48651f2e48 src/getchar.c
--- a/src/getchar.c Sat Jul 02 12:45:05 2022 +0200
+++ b/src/getchar.c Sat Jul 02 13:15:02 2022 +0200
@@ -2437,7 +2437,8 @@
24372437 int is_plug_map = FALSE;
24382438
24392439 // If typehead starts with <Plug> then remap, even for a "noremap" mapping.
2440- if (typebuf.tb_buf[typebuf.tb_off] == K_SPECIAL
2440+ if (typebuf.tb_len >= 3
2441+ && typebuf.tb_buf[typebuf.tb_off] == K_SPECIAL
24412442 && typebuf.tb_buf[typebuf.tb_off + 1] == KS_EXTRA
24422443 && typebuf.tb_buf[typebuf.tb_off + 2] == KE_PLUG)
24432444 is_plug_map = TRUE;
diff -r cffb457247f4 -r 4e48651f2e48 src/version.c
--- a/src/version.c Sat Jul 02 12:45:05 2022 +0200
+++ b/src/version.c Sat Jul 02 13:15:02 2022 +0200
@@ -736,6 +736,8 @@
736736 static int included_patches[] =
737737 { /* Add new patch number below this line */
738738 /**/
739+ 24,
740+/**/
739741 23,
740742 /**/
741743 22,
Afficher sur ancien navigateur de dépôt.