mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-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.
bc197195b0
This commit is contained in:
parent
5ed303c22b
commit
cb708d203b
@ -4922,8 +4922,11 @@ regmatch (
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (has_mbyte) {
|
if (has_mbyte) {
|
||||||
|
const char_u *const 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 {
|
||||||
rp->rs_un.regsave.rs_u.pos.col--;
|
rp->rs_un.regsave.rs_u.pos.col--;
|
||||||
|
Loading…
Reference in New Issue
Block a user