mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 00:18:33 +00:00
vim-patch:7.4.715 #4003
Problem: Invalid memory access when there are illegal bytes.
Solution: Get the length from the text, not from the character. (Dominique
Pelle)
2186ffa2c7
This commit is contained in:

committed by
Justin M. Keyes

parent
2c76651438
commit
62f1aaedb1
@@ -5875,7 +5875,7 @@ static int nfa_regmatch(nfa_regprog_T *prog, nfa_state_T *start, regsubs_T *subm
|
|||||||
// If ireg_icombine is not set only skip over the character
|
// If ireg_icombine is not set only skip over the character
|
||||||
// itself. When it is set skip over composing characters.
|
// itself. When it is set skip over composing characters.
|
||||||
if (result && enc_utf8 && !ireg_icombine) {
|
if (result && enc_utf8 && !ireg_icombine) {
|
||||||
clen = utf_char2len(curc);
|
clen = utf_ptr2len(reginput);
|
||||||
}
|
}
|
||||||
|
|
||||||
ADD_STATE_IF_MATCH(t->state);
|
ADD_STATE_IF_MATCH(t->state);
|
||||||
|
@@ -409,7 +409,7 @@ static int included_patches[] = {
|
|||||||
// 718,
|
// 718,
|
||||||
// 717,
|
// 717,
|
||||||
// 716,
|
// 716,
|
||||||
// 715,
|
715,
|
||||||
714,
|
714,
|
||||||
713,
|
713,
|
||||||
712,
|
712,
|
||||||
|
Reference in New Issue
Block a user