diff options
author | Michael Ennen <mike.ennen@gmail.com> | 2016-01-13 16:11:14 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-01-13 22:12:53 -0500 |
commit | 62f1aaedb1e53813caf44c0eb8f8925843be6ae3 (patch) | |
tree | eb439afc837e01854efcb6f3c3fd9f2ee315b645 /src/nvim/regexp_nfa.c | |
parent | 2c76651438a297d9e104bf9c669a7a1339e24bb4 (diff) | |
download | rneovim-62f1aaedb1e53813caf44c0eb8f8925843be6ae3.tar.gz rneovim-62f1aaedb1e53813caf44c0eb8f8925843be6ae3.tar.bz2 rneovim-62f1aaedb1e53813caf44c0eb8f8925843be6ae3.zip |
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)
https://github.com/vim/vim/commit/2186ffa2c7d8a9e2cb09316a7ac9e4ade3957c2f
Diffstat (limited to 'src/nvim/regexp_nfa.c')
-rw-r--r-- | src/nvim/regexp_nfa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/regexp_nfa.c b/src/nvim/regexp_nfa.c index b96dcc66b3..1fd024a062 100644 --- a/src/nvim/regexp_nfa.c +++ b/src/nvim/regexp_nfa.c @@ -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 // itself. When it is set skip over composing characters. if (result && enc_utf8 && !ireg_icombine) { - clen = utf_char2len(curc); + clen = utf_ptr2len(reginput); } ADD_STATE_IF_MATCH(t->state); |