diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-12-19 12:27:23 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-12-19 12:27:23 +0100 |
commit | 2efb323e875d2852f63e41c40641760d1d6b069f (patch) | |
tree | b45519644d8316b0f2312dce30d73cc60de79838 /src/ops.c | |
parent | 338e47fdfdf0d918dae50a5cbf0cf4f7be45b4f0 (diff) | |
download | vim-git-2efb323e875d2852f63e41c40641760d1d6b069f.tar.gz |
patch 8.0.1411: reading invalid memory with CTRL-W :v8.0.1411
Problem: Reading invalid memory with CTRL-W :.
Solution: Correct the command characters. (closes #2469)
Diffstat (limited to 'src/ops.c')
-rw-r--r-- | src/ops.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -183,8 +183,15 @@ get_op_type(int char1, int char2) if (char1 == 'g' && char2 == Ctrl_X) /* subtract */ return OP_NR_SUB; for (i = 0; ; ++i) + { if (opchars[i][0] == char1 && opchars[i][1] == char2) break; + if (i == (int)(sizeof(opchars) / sizeof(char [3]) - 1)) + { + internal_error("get_op_type()"); + break; + } + } return i; } |