patch 7.4.714 Problem: Illegal memory access when there are illegal bytes. Solution: Check the byte length of the character. (Dominique Pelle)

This commit is contained in:
Bram Moolenaar
2015-05-04 09:56:57 +02:00
committed by Douglas Drumond
parent 4011b53d6c
commit 526b318d13
2 changed files with 3 additions and 1 deletions
+1 -1
View 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])
+2
View File
@@ -756,6 +756,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
714,
/**/
713,
/**/