summaryrefslogtreecommitdiff
path: root/src/regexp_nfa.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-05-04 10:33:15 +0200
committerBram Moolenaar <Bram@vim.org>2015-05-04 10:33:15 +0200
commit2186ffa2c7d8a9e2cb09316a7ac9e4ade3957c2f (patch)
tree7c869d126780d802efde4d98b7a040cab032da0f /src/regexp_nfa.c
parent069dd08d8dbbbadc4e6780d5c881a24bce79a4f7 (diff)
downloadvim-git-2186ffa2c7d8a9e2cb09316a7ac9e4ade3957c2f.tar.gz
patch 7.4.715v7.4.715
Problem: Invalid memory access when there are illegal bytes. Solution: Get the length from the text, not from the character. (Dominique Pelle)
Diffstat (limited to 'src/regexp_nfa.c')
-rw-r--r--src/regexp_nfa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 825f960ca..bb55a7159 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -6602,7 +6602,7 @@ nfa_regmatch(prog, start, submatch, m)
/* 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);
#endif
ADD_STATE_IF_MATCH(t->state);
break;