1
0
forked from aniani/vim

patch 8.1.0324: off-by-one error in cmdidx check

Problem:    Off-by-one error in cmdidx check. (Coverity)
Solution:   Use ">=" instead of ">".
This commit is contained in:
Bram Moolenaar
2018-08-23 22:51:40 +02:00
parent 2551c037e4
commit 74c8be2c68
2 changed files with 3 additions and 1 deletions

View File

@@ -12554,7 +12554,7 @@ ex_folddo(exarg_T *eap)
int
is_loclist_cmd(int cmdidx)
{
if (cmdidx < 0 || cmdidx > CMD_SIZE)
if (cmdidx < 0 || cmdidx >= CMD_SIZE)
return FALSE;
return cmdnames[cmdidx].cmd_name[0] == 'l';
}

View File

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