diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-08-23 22:51:40 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-08-23 22:51:40 +0200 |
commit | 74c8be2c6803eda3a57991b8867c5c65259b73d6 (patch) | |
tree | c61d3d17a92a3280ac2fa1e662caf02afae041ce /src | |
parent | 2551c037e41b3c2702d3ec30ee518c11966b19e6 (diff) |
patch 8.1.0324: off-by-one error in cmdidx checkv8.1.0324
Problem: Off-by-one error in cmdidx check. (Coverity)
Solution: Use ">=" instead of ">".
Diffstat (limited to 'src')
-rw-r--r-- | src/ex_docmd.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index fc2b20ea7d..d4cf6a2c04 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -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'; } diff --git a/src/version.c b/src/version.c index 01854c85cb..bf40df79e9 100644 --- a/src/version.c +++ b/src/version.c @@ -795,6 +795,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 324, +/**/ 323, /**/ 322, |