# HG changeset patch # User Bram Moolenaar # Date 1430726209 -7200 # Node ID de90405940be26a9315d54840c539b9391d16565 # Parent b11cc98ca9858b0204436e26f996b41295817246 patch 7.4.714 Problem: Illegal memory access when there are illegal bytes. Solution: Check the byte length of the character. (Dominique Pelle) diff --git a/src/regexp.c b/src/regexp.c --- a/src/regexp.c +++ b/src/regexp.c @@ -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]) 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 */ /**/ + 714, +/**/ 713, /**/ 712,