mirror of
https://github.com/vim/vim.git
synced 2025-10-05 05:34:07 -04:00
patch 8.0.1517: invalid memory acces with pattern using look-behind match
Problem: Invalid memory acces with pattern using look-behind match. (Dominique Pelle) Solution: Get a pointer to the right line.
This commit is contained in:
@@ -5585,9 +5585,14 @@ regmatch(
|
|||||||
{
|
{
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
if (has_mbyte)
|
if (has_mbyte)
|
||||||
|
{
|
||||||
|
char_u *line =
|
||||||
|
reg_getline(behind_pos.rs_u.pos.lnum);
|
||||||
|
|
||||||
rp->rs_un.regsave.rs_u.pos.col -=
|
rp->rs_un.regsave.rs_u.pos.col -=
|
||||||
(*mb_head_off)(regline, regline
|
(*mb_head_off)(line, line
|
||||||
+ rp->rs_un.regsave.rs_u.pos.col - 1) + 1;
|
+ rp->rs_un.regsave.rs_u.pos.col - 1) + 1;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
--rp->rs_un.regsave.rs_u.pos.col;
|
--rp->rs_un.regsave.rs_u.pos.col;
|
||||||
|
@@ -771,6 +771,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 */
|
||||||
|
/**/
|
||||||
|
1517,
|
||||||
/**/
|
/**/
|
||||||
1516,
|
1516,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user