vim-patch:7.4.937

Problem:    Segfault reading unitialized memory.
Solution:   Do not read match \z0, it does not exist. (Marius Gedminas, closes
            vim/vim#497)

5ad075c073
This commit is contained in:
watiko 2016-02-17 02:22:46 +09:00
parent 5af9ae9e60
commit db20edef69
2 changed files with 3 additions and 2 deletions

View File

@ -6180,7 +6180,8 @@ static long nfa_regtry(nfa_regprog_T *prog, colnr_T col)
if (prog->reghasz == REX_SET) {
cleanup_zsubexpr();
re_extmatch_out = make_extmatch();
for (i = 0; i < subs.synt.in_use; i++) {
// Loop over \z1, \z2, etc. There is no \z0.
for (i = 1; i < subs.synt.in_use; i++) {
if (REG_MULTI) {
struct multipos *mpos = &subs.synt.list.multi[i];

View File

@ -351,7 +351,7 @@ static int included_patches[] = {
// 940 NA
// 939,
// 938 NA
// 937,
937,
// 936,
// 935,
// 934 NA