To: vim_dev@googlegroups.com Subject: Patch 7.4.1936 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1936 Problem: Off-by-one error in bounds check. (Coverity) Solution: Check register number properly. Files: src/ops.c *** ../vim-7.4.1935/src/ops.c 2016-06-12 21:18:38.203260733 +0200 --- src/ops.c 2016-06-14 21:30:58.123265320 +0200 *************** *** 6011,6017 **** return; flags = vp[0].bv_nr; name = vp[1].bv_nr; ! if (name < 0 || name > NUM_REGISTERS) return; type = vp[2].bv_nr; if (type != MCHAR && type != MLINE && type != MBLOCK) --- 6011,6017 ---- return; flags = vp[0].bv_nr; name = vp[1].bv_nr; ! if (name < 0 || name >= NUM_REGISTERS) return; type = vp[2].bv_nr; if (type != MCHAR && type != MLINE && type != MBLOCK) *** ../vim-7.4.1935/src/version.c 2016-06-14 20:39:38.108512723 +0200 --- src/version.c 2016-06-14 21:31:39.174818154 +0200 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 1936, /**/ -- A fool learns from his mistakes, a wise man from someone else's. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///