# HG changeset patch # User Bram Moolenaar # Date 1430728395 -7200 # Node ID 5caf46fd6e246bec8a1286ab77faa598d567d988 # Parent 51fbaeb82b0b5afcb2221d9153dc92b85f18773b 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) diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c @@ -6602,7 +6602,7 @@ nfa_regmatch(prog, start, submatch, m) /* 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); #endif ADD_STATE_IF_MATCH(t->state); break; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 715, +/**/ 714, /**/ 713,