From 8eb0888a5de2481e15fcae63fa477f0ac634c9f2 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 13 Jan 2018 19:26:30 +0100 Subject: vim-patch:8.0.0582: illegal memory access with z= command Problem: Illegal memory access with z= command. (Dominique Pelle) Solution: Avoid case folded text to be longer than the original text. Use MB_PTR2LEN() instead of MB_BYTE2LEN(). https://github.com/vim/vim/commit/5b276aa80e112ae1993bd43e28f599f257827c54 --- src/nvim/testdir/test_spell.vim | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_spell.vim b/src/nvim/testdir/test_spell.vim index 334568aadb..66be5c2441 100644 --- a/src/nvim/testdir/test_spell.vim +++ b/src/nvim/testdir/test_spell.vim @@ -18,3 +18,12 @@ func Test_wrap_search() bwipe! set nospell endfunc + +func Test_z_equal_on_invalid_utf8_word() + split + set spell + call setline(1, "\xff") + norm z= + set nospell + bwipe! +endfunc -- cgit