Mercurial > vim
changeset 9307:eb52a2670c96 v7.4.1936
commit https://github.com/vim/vim/commit/67e3720a9ddd8a9d2e8344358c28fa1f4196db0d
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jun 14 21:32:28 2016 +0200
patch 7.4.1936
Problem: Off-by-one error in bounds check. (Coverity)
Solution: Check register number properly.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 14 Jun 2016 21:45:06 +0200 |
parents | 6eb5bb2b63de |
children | f5d2996c527f |
files | src/ops.c src/version.c |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ops.c +++ b/src/ops.c @@ -6011,7 +6011,7 @@ handle_viminfo_register(garray_T *values 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)