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:
@@ -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)
|
||||||
|
@@ -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,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user