1
0
forked from aniani/vim

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; return;
flags = vp[0].bv_nr; flags = vp[0].bv_nr;
name = vp[1].bv_nr; name = vp[1].bv_nr;
if (name < 0 || name > NUM_REGISTERS) if (name < 0 || name >= NUM_REGISTERS)
return; return;
type = vp[2].bv_nr; type = vp[2].bv_nr;
if (type != MCHAR && type != MLINE && type != MBLOCK) if (type != MCHAR && type != MLINE && type != MBLOCK)

View File

@@ -753,6 +753,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 */
/**/
1936,
/**/ /**/
1935, 1935,
/**/ /**/