From 62f1aaedb1e53813caf44c0eb8f8925843be6ae3 Mon Sep 17 00:00:00 2001 From: Michael Ennen Date: Wed, 13 Jan 2016 16:11:14 -0700 Subject: 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 --- src/nvim/regexp_nfa.c | 2 +- src/nvim/version.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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, -- cgit