summaryrefslogtreecommitdiff
path: root/src/testdir/test_spell.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-04-22 23:49:52 +0200
committerBram Moolenaar <Bram@vim.org>2017-04-22 23:49:52 +0200
commit5b276aa80e112ae1993bd43e28f599f257827c54 (patch)
treeeeab3f5b2d7834c7755e1cc74e3245567308714e /src/testdir/test_spell.vim
parent94be619e30e82d28cadeea5e0766c6f5c321ff8b (diff)
downloadvim-5b276aa80e112ae1993bd43e28f599f257827c54.zip
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().
Diffstat (limited to 'src/testdir/test_spell.vim')
-rw-r--r--src/testdir/test_spell.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim
index e6c3729b1..0688d615e 100644
--- a/src/testdir/test_spell.vim
+++ b/src/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