Patch 8.0.1411
Problem: Reading invalid memory with CTRL-W :.
Solution: Correct the command characters. (closes #2469)
Files: src/normal.c, src/testdir/test_window_cmd.vim, src/ops.c
*** ../vim-8.0.1410/src/normal.c 2017-11-25 17:14:29.608189513 +0100
--- src/normal.c 2017-12-19 12:21:36.080595835 +0100
***************
*** 7850,7857 ****
--- 7850,7861 ----
nv_window(cmdarg_T *cap)
{
if (cap->nchar == ':')
+ {
/* "CTRL-W :" is the same as typing ":"; useful in a terminal window */
+ cap->cmdchar = ':';
+ cap->nchar = NUL;
nv_colon(cap);
+ }
else if (!checkclearop(cap->oap))
do_window(cap->nchar, cap->count0, NUL); /* everything is in window.c */
}
*** ../vim-8.0.1410/src/testdir/test_window_cmd.vim 2017-12-02
15:43:28.494450656 +0100
--- src/testdir/test_window_cmd.vim 2017-12-19 12:13:34.995728132 +0100
***************
*** 467,470 ****
--- 467,475 ----
call test_garbagecollect_now()
endfunc
+ func Test_window_colon_command()
+ " This was reading invalid memory.
+ exe "norm! v\<C-W>:\<C-U>echo v:version"
+ endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.0.1410/src/ops.c 2017-12-17 14:54:57.199422897 +0100
--- src/ops.c 2017-12-19 12:17:25.478228212 +0100
***************
*** 183,190 ****
--- 183,197 ----
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;
}
*** ../vim-8.0.1410/src/version.c 2017-12-19 11:54:59.726923324 +0100
--- src/version.c 2017-12-19 12:14:12.315485388 +0100
***************
*** 773,774 ****
--- 773,776 ----
{ /* Add new patch number below this line */
+ /**/
+ 1411,
/**/
--
hundred-and-one symptoms of being an internet addict:
129. You cancel your newspaper subscription.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.