Mercurial > vim
annotate src/testdir/test26.in @ 10644:2025bec9175f v8.0.0212
patch 8.0.0212: buffer for key name may be too small
commit https://github.com/vim/vim/commit/423977d3cebac2be1158b1d11da60fe96db4b750
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 22 15:05:12 2017 +0100
patch 8.0.0212: buffer for key name may be too small
Problem: The buffer used to store a key name theoreticaly could be too
small. (Coverity)
Solution: Count all possible modifier characters. Add a check for the
length just in case.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 22 Jan 2017 15:15:04 +0100 |
parents | b63792dadc23 |
children |
rev | line source |
---|---|
7 | 1 Test for :execute, :while and :if |
2 | |
3 STARTTEST | |
4 :so small.vim | |
5 mt:let i = 0 | |
6 :while i < 12 | |
7 : let i = i + 1 | |
8 : if has("ebcdic") | |
9 : execute "normal o" . i . "\047" | |
10 : else | |
11 : execute "normal o" . i . "\033" | |
12 : endif | |
13 : if i % 2 | |
14 : normal Ax | |
15 : if i == 9 | |
16 : break | |
17 : endif | |
18 : if i == 5 | |
19 : continue | |
20 : else | |
21 : let j = 9 | |
22 : while j > 0 | |
23 : if has("ebcdic") | |
24 : execute "normal" j . "a" . j . "\x27" | |
25 : else | |
26 : execute "normal" j . "a" . j . "\x1b" | |
27 : endif | |
28 : let j = j - 1 | |
29 : endwhile | |
30 : endif | |
31 : endif | |
32 : if i == 9 | |
33 : if has("ebcdic") | |
34 : execute "normal Az\047" | |
35 : else | |
36 : execute "normal Az\033" | |
37 : endif | |
38 : endif | |
39 :endwhile | |
1405 | 40 :unlet i j |
7 | 41 :'t,$w! test.out |
42 :qa! | |
43 ENDTEST | |
44 |