]> granicus.if.org Git - vim/commitdiff
patch 7.4.714 v7.4.714
authorBram Moolenaar <Bram@vim.org>
Mon, 4 May 2015 07:56:49 +0000 (09:56 +0200)
committerBram Moolenaar <Bram@vim.org>
Mon, 4 May 2015 07:56:49 +0000 (09:56 +0200)
Problem:    Illegal memory access when there are illegal bytes.
Solution:   Check the byte length of the character. (Dominique Pelle)

src/regexp.c
src/version.c

index 6ae05f8f9ea957da3033965e19381aeafd7aca0b..85e0458de0cd1d5065ada9007861b5247c7ae0ea 100644 (file)
@@ -6113,7 +6113,7 @@ do_class:
            {
                if (ireg_ic && enc_utf8)
                    cf = utf_fold(utf_ptr2char(opnd));
-               while (count < maxcount)
+               while (count < maxcount && (*mb_ptr2len)(scan) >= len)
                {
                    for (i = 0; i < len; ++i)
                        if (opnd[i] != scan[i])
index 4097dac092d6ae2b442e0833bf116d98bbc8e227..8f994cd798251f9ac738891f3bc185be42a8d640 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    714,
 /**/
     713,
 /**/