diff options
author | Jurica Bradaric <jbradaric@gmail.com> | 2016-02-02 18:54:52 +0100 |
---|---|---|
committer | Jurica Bradaric <jbradaric@gmail.com> | 2016-02-02 19:54:04 +0100 |
commit | f20818de3126b01fb6b18696db2621fa4880b632 (patch) | |
tree | 39c4f4779f49335849357195af1478f772567a4b /src | |
parent | 2b2f9ccf8c5ace922f0e2682adabea8461b54ea5 (diff) | |
download | rneovim-f20818de3126b01fb6b18696db2621fa4880b632.tar.gz rneovim-f20818de3126b01fb6b18696db2621fa4880b632.tar.bz2 rneovim-f20818de3126b01fb6b18696db2621fa4880b632.zip |
vim-patch:7.4.811
Problem: Invalid memory access when using "exe 'sc'".
Solution: Avoid going over the end of the string. (Dominique Pelle)
https://github.com/vim/vim/commit/204b93f95831454e6924acf30b16fd4bdfda0d14
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_docmd.c | 7 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 755e1b9f64..c45be3de74 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -2348,8 +2348,11 @@ static char_u *find_command(exarg_T *eap, int *full) eap->cmdidx = CMD_k; ++p; } else if (p[0] == 's' - && ((p[1] == 'c' && p[2] != 's' && p[2] != 'r' - && p[3] != 'i' && p[4] != 'p') + && ((p[1] == 'c' + && (p[2] == NUL + || (p[2] != 's' && p[2] != 'r' + && (p[3] == NUL + || (p[3] != 'i' && p[4] != 'p'))))) || p[1] == 'g' || (p[1] == 'i' && p[2] != 'm' && p[2] != 'l' && p[2] != 'g') || p[1] == 'I' diff --git a/src/nvim/version.c b/src/nvim/version.c index e46de678c5..31a839fd05 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -477,7 +477,7 @@ static int included_patches[] = { // 814, 813, // 812, - // 811, + 811, 810, 809, // 808 NA |