Mercurial > vim
diff src/regexp_nfa.c @ 6787:5caf46fd6e24 v7.4.715
patch 7.4.715
Problem: Invalid memory access when there are illegal bytes.
Solution: Get the length from the text, not from the character. (Dominique
Pelle)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Mon, 04 May 2015 10:33:15 +0200 |
parents | 4c4c8a53347b |
children | 94b179585851 |
line wrap: on
line diff
--- 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;