1
0
forked from aniani/vim

patch 7.4.715

Problem:    Invalid memory access when there are illegal bytes.
Solution:   Get the length from the text, not from the character. (Dominique
            Pelle)
This commit is contained in:
Bram Moolenaar
2015-05-04 10:33:15 +02:00
parent 069dd08d8d
commit 2186ffa2c7
2 changed files with 3 additions and 1 deletions

View File

@@ -6602,7 +6602,7 @@ nfa_regmatch(prog, start, submatch, m)
/* 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);
#endif #endif
ADD_STATE_IF_MATCH(t->state); ADD_STATE_IF_MATCH(t->state);
break; break;

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
715,
/**/ /**/
714, 714,
/**/ /**/