mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
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.
This commit is contained in:
@@ -2437,7 +2437,8 @@ handle_mapping(
|
|||||||
int is_plug_map = FALSE;
|
int is_plug_map = FALSE;
|
||||||
|
|
||||||
// If typehead starts with <Plug> then remap, even for a "noremap" mapping.
|
// If typehead starts with <Plug> then remap, even for a "noremap" mapping.
|
||||||
if (typebuf.tb_buf[typebuf.tb_off] == K_SPECIAL
|
if (typebuf.tb_len >= 3
|
||||||
|
&& typebuf.tb_buf[typebuf.tb_off] == K_SPECIAL
|
||||||
&& typebuf.tb_buf[typebuf.tb_off + 1] == KS_EXTRA
|
&& typebuf.tb_buf[typebuf.tb_off + 1] == KS_EXTRA
|
||||||
&& typebuf.tb_buf[typebuf.tb_off + 2] == KE_PLUG)
|
&& typebuf.tb_buf[typebuf.tb_off + 2] == KE_PLUG)
|
||||||
is_plug_map = TRUE;
|
is_plug_map = TRUE;
|
||||||
|
@@ -735,6 +735,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
24,
|
||||||
/**/
|
/**/
|
||||||
23,
|
23,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user