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/ex_docmd.c | |
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/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 2 |
1 files changed, 1 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'; } |