mirror of
https://github.com/vim/vim.git
synced 2025-10-18 07:54:29 -04:00
updated for version 7.4.685
Problem: When there are illegal utf-8 characters the old regexp engine may go past the end of a string. Solution: Only advance to the end of the string. (Dominique Pelle)
This commit is contained in:
@@ -4782,7 +4782,8 @@ regmatch(scan)
|
|||||||
/* When only a composing char is given match at any
|
/* When only a composing char is given match at any
|
||||||
* position where that composing char appears. */
|
* position where that composing char appears. */
|
||||||
status = RA_NOMATCH;
|
status = RA_NOMATCH;
|
||||||
for (i = 0; reginput[i] != NUL; i += utf_char2len(inpc))
|
for (i = 0; reginput[i] != NUL;
|
||||||
|
i += utf_ptr2len(reginput + i))
|
||||||
{
|
{
|
||||||
inpc = mb_ptr2char(reginput + i);
|
inpc = mb_ptr2char(reginput + i);
|
||||||
if (!utf_iscomposing(inpc))
|
if (!utf_iscomposing(inpc))
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
685,
|
||||||
/**/
|
/**/
|
||||||
684,
|
684,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user