summaryrefslogtreecommitdiff
path: root/src/ops.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-06-14 21:32:28 +0200
committerBram Moolenaar <Bram@vim.org>2016-06-14 21:32:28 +0200
commit67e3720a9ddd8a9d2e8344358c28fa1f4196db0d (patch)
tree358f2dcc64cb3c46807924021ad7ce2ffe622403 /src/ops.c
parentbee666f239eada035d288b77269aebc42f644ea6 (diff)
downloadvim-git-67e3720a9ddd8a9d2e8344358c28fa1f4196db0d.tar.gz
patch 7.4.1936v7.4.1936
Problem: Off-by-one error in bounds check. (Coverity) Solution: Check register number properly.
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ops.c b/src/ops.c
index 44cd47366..d97107e22 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -6011,7 +6011,7 @@ handle_viminfo_register(garray_T *values, int force)
return;
flags = vp[0].bv_nr;
name = vp[1].bv_nr;
- if (name < 0 || name > NUM_REGISTERS)
+ if (name < 0 || name >= NUM_REGISTERS)
return;
type = vp[2].bv_nr;
if (type != MCHAR && type != MLINE && type != MBLOCK)