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)

2186ffa2c7
This commit is contained in:
Michael Ennen
2016-01-13 16:11:14 -07:00
committed by Justin M. Keyes
parent 2c76651438
commit 62f1aaedb1
2 changed files with 2 additions and 2 deletions

View File

@@ -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 // If ireg_icombine is not set only skip over the character
// itself. When it is set skip over composing characters. // itself. When it is set skip over composing characters.
if (result && enc_utf8 && !ireg_icombine) { if (result && enc_utf8 && !ireg_icombine) {
clen = utf_char2len(curc); clen = utf_ptr2len(reginput);
} }
ADD_STATE_IF_MATCH(t->state); ADD_STATE_IF_MATCH(t->state);

View File

@@ -409,7 +409,7 @@ static int included_patches[] = {
// 718, // 718,
// 717, // 717,
// 716, // 716,
// 715, 715,
714, 714,
713, 713,
712, 712,