aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Ennen <mike.ennen@gmail.com>2016-01-13 16:11:14 -0700
committerJustin M. Keyes <justinkz@gmail.com>2016-01-13 22:12:53 -0500
commit62f1aaedb1e53813caf44c0eb8f8925843be6ae3 (patch)
treeeb439afc837e01854efcb6f3c3fd9f2ee315b645
parent2c76651438a297d9e104bf9c669a7a1339e24bb4 (diff)
downloadrneovim-62f1aaedb1e53813caf44c0eb8f8925843be6ae3.tar.gz
rneovim-62f1aaedb1e53813caf44c0eb8f8925843be6ae3.tar.bz2
rneovim-62f1aaedb1e53813caf44c0eb8f8925843be6ae3.zip
vim-patch:7.4.715 #4003
Problem: Invalid memory access when there are illegal bytes. Solution: Get the length from the text, not from the character. (Dominique Pelle) https://github.com/vim/vim/commit/2186ffa2c7d8a9e2cb09316a7ac9e4ade3957c2f
-rw-r--r--src/nvim/regexp_nfa.c2
-rw-r--r--src/nvim/version.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c
index b96dcc66b3..1fd024a062 100644
--- a/src/nvim/regexp_nfa.c
+++ b/src/nvim/regexp_nfa.c
@@ -5875,7 +5875,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm
// If ireg_icombine is not set only skip over the character
// itself. When it is set skip over composing characters.
if (result && enc_utf8 && !ireg_icombine) {
- clen = utf_char2len(curc);
+ clen = utf_ptr2len(reginput);
}
ADD_STATE_IF_MATCH(t->state);
diff --git a/src/nvim/version.c b/src/nvim/version.c
index f41bcad244..b38caf52f2 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -409,7 +409,7 @@ static int included_patches[] = {
// 718,
// 717,
// 716,
- // 715,
+ 715,
714,
713,
712,