To: vim_dev@googlegroups.com Subject: Patch 7.4.1968 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1968 Problem: Invalid memory access with "\. Solution: Do not recognize this as a special character. (Dominique Pelle) Files: src/misc2.c, src/testdir/test_expr.vim *** ../vim-7.4.1967/src/misc2.c 2016-06-26 16:44:19.519620863 +0200 --- src/misc2.c 2016-07-01 11:59:30.802055114 +0200 *************** *** 2741,2748 **** else #endif l = 1; ! if (bp[l + 1] == '>') ! bp += l; /* anything accepted, like */ } } if (bp[0] == 't' && bp[1] == '_' && bp[2] && bp[3]) --- 2741,2750 ---- else #endif l = 1; ! /* Anything accepted, like , except , because the " ! * ends the string. */ ! if (bp[l] != '"' && bp[l + 1] == '>') ! bp += l; } } if (bp[0] == 't' && bp[1] == '_' && bp[2] && bp[3]) *** ../vim-7.4.1967/src/testdir/test_expr.vim 2016-05-25 22:51:13.385755343 +0200 --- src/testdir/test_expr.vim 2016-07-01 11:57:35.763718713 +0200 *************** *** 101,103 **** --- 101,108 ---- func Test_set_reg_null_list() call setreg('x', test_null_list()) endfunc + + func Test_special_char() + " The failure is only visible using valgrind. + call assert_fails('echo "\') + endfunc *** ../vim-7.4.1967/src/version.c 2016-06-28 22:39:12.144467418 +0200 --- src/version.c 2016-07-01 11:48:16.555809160 +0200 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 1968, /**/ -- "Hit any key to continue" is very confusing when you have two keyboards. /// 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 ///