annotate src/testdir/test_modeline.vim @ 14381:d9e6eec551e1 v8.1.0205

patch 8.1.0205: invalid memory access with invalid modeline commit https://github.com/vim/vim/commit/9cf4b5005f12ce1d6692266140bdda05d0312d79 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jul 23 04:12:03 2018 +0200 patch 8.1.0205: invalid memory access with invalid modeline Problem: Invalid memory access with invalid modeline. Solution: Pass pointer limit. Add a test. (closes https://github.com/vim/vim/issues/3241)
author Christian Brabandt <cb@256bit.org>
date Mon, 23 Jul 2018 04:15:05 +0200
parents
children 8846b8344430
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14381
d9e6eec551e1 patch 8.1.0205: invalid memory access with invalid modeline
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Tests for parsing the modeline.
d9e6eec551e1 patch 8.1.0205: invalid memory access with invalid modeline
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
d9e6eec551e1 patch 8.1.0205: invalid memory access with invalid modeline
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 func Test_invalid()
d9e6eec551e1 patch 8.1.0205: invalid memory access with invalid modeline
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 " This was reading before allocated memory.
d9e6eec551e1 patch 8.1.0205: invalid memory access with invalid modeline
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 call writefile(['vi:0', 'nothing'], 'Xmodeline')
d9e6eec551e1 patch 8.1.0205: invalid memory access with invalid modeline
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 call assert_fails('split Xmodeline', 'E518:')
d9e6eec551e1 patch 8.1.0205: invalid memory access with invalid modeline
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 bwipe!
d9e6eec551e1 patch 8.1.0205: invalid memory access with invalid modeline
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 endfunc