changeset 14621:89cc3e7ecb68 v8.1.0324

patch 8.1.0324: off-by-one error in cmdidx check commit https://github.com/vim/vim/commit/74c8be2c6803eda3a57991b8867c5c65259b73d6 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 23 22:51:40 2018 +0200 patch 8.1.0324: off-by-one error in cmdidx check Problem: Off-by-one error in cmdidx check. (Coverity) Solution: Use ">=" instead of ">".
author Christian Brabandt <cb@256bit.org>
date Thu, 23 Aug 2018 23:00:05 +0200
parents 24ab1eb625e1
children d6eed9f439d7
files src/ex_docmd.c src/version.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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';
 }
--- 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,