]> granicus.if.org Git - vim/commitdiff
patch 7.4.715 v7.4.715
authorBram Moolenaar <Bram@vim.org>
Mon, 4 May 2015 08:33:15 +0000 (10:33 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 4 May 2015 08:33:15 +0000 (10:33 +0200)
Problem:    Invalid memory access when there are illegal bytes.
Solution:   Get the length from the text, not from the character. (Dominique
            Pelle)

src/regexp_nfa.c
src/version.c

index 825f960ca742f8c8fe71e248cdbe9bf5cc80b15a..bb55a7159be8f8d041cf170339595d9bd44b7f2f 100644 (file)
@@ -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;
index 8f994cd798251f9ac738891f3bc185be42a8d640..7a151bf97359c909eb959e6f2d28b72e2c82991f 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    715,
 /**/
     714,
 /**/