diff options
author | Jurica Bradaric <jbradaric@gmail.com> | 2016-01-23 13:53:59 +0100 |
---|---|---|
committer | Jurica Bradaric <jbradaric@gmail.com> | 2016-01-23 13:57:07 +0100 |
commit | f583e512092ecada59f21bc0559b76bcb094b70f (patch) | |
tree | dbb4c8f2ca00a19d49a9b77f8f72eb547c5bfa64 /src | |
parent | 0ccd1ef725ce4fbe0f86929efad25b24b17c2485 (diff) | |
download | rneovim-f583e512092ecada59f21bc0559b76bcb094b70f.tar.gz rneovim-f583e512092ecada59f21bc0559b76bcb094b70f.tar.bz2 rneovim-f583e512092ecada59f21bc0559b76bcb094b70f.zip |
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)
https://github.com/vim/vim/commit/0e462411cafdd908356792b2c229ab6369103bca
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/regexp.c | 2 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/regexp.c b/src/nvim/regexp.c index 39001939d8..e01e812a70 100644 --- a/src/nvim/regexp.c +++ b/src/nvim/regexp.c @@ -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) diff --git a/src/nvim/version.c b/src/nvim/version.c index 9b4c191d89..3687087d85 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -439,7 +439,7 @@ static int included_patches[] = { // 688, // 687 NA 686, - // 685, + 685, // 684, // 683 NA 682, |