mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
vim-patch: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)
0e462411ca
This commit is contained in:
parent
0ccd1ef725
commit
f583e51209
@ -4186,7 +4186,7 @@ regmatch (
|
||||
/* When only a composing char is given match at any
|
||||
* position where that composing char appears. */
|
||||
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);
|
||||
if (!utf_iscomposing(inpc)) {
|
||||
if (i > 0)
|
||||
|
@ -439,7 +439,7 @@ static int included_patches[] = {
|
||||
// 688,
|
||||
// 687 NA
|
||||
686,
|
||||
// 685,
|
||||
685,
|
||||
// 684,
|
||||
// 683 NA
|
||||
682,
|
||||
|
Loading…
Reference in New Issue
Block a user