diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-06-14 21:32:28 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-06-14 21:32:28 +0200 |
commit | 67e3720a9ddd8a9d2e8344358c28fa1f4196db0d (patch) | |
tree | 358f2dcc64cb3c46807924021ad7ce2ffe622403 /src/ops.c | |
parent | bee666f239eada035d288b77269aebc42f644ea6 (diff) | |
download | vim-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |