0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 7.4.1936

Problem:    Off-by-one error in bounds check. (Coverity)
Solution:   Check register number properly.
This commit is contained in:
Bram Moolenaar
2016-06-14 21:32:28 +02:00
parent bee666f239
commit 67e3720a9d
2 changed files with 3 additions and 1 deletions

View File

@@ -6011,7 +6011,7 @@ handle_viminfo_register(garray_T *values, int force)
return;
flags = vp[0].bv_nr;
name = vp[1].bv_nr;
if (name < 0 || name > NUM_REGISTERS)
if (name < 0 || name >= NUM_REGISTERS)
return;
type = vp[2].bv_nr;
if (type != MCHAR && type != MLINE && type != MBLOCK)

View File

@@ -753,6 +753,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1936,
/**/
1935,
/**/