comparison src/regexp_nfa.c @ 7258:7245d8635ac7 v7.4.937

commit https://github.com/vim/vim/commit/5ad075c0735d3d8b97708d17c22de8facb15f997 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Nov 24 15:18:32 2015 +0100 patch 7.4.937 Problem: Segfault reading unitialized memory. Solution: Do not read match \z0, it does not exist. (Marius Gedminas, closes https://github.com/vim/vim/issues/497)
author Christian Brabandt <cb@256bit.org>
date Tue, 24 Nov 2015 15:30:05 +0100
parents cbdc02d71a18
children 0b6c37dd858d
comparison
equal deleted inserted replaced
7257:a49ad3a505cf 7258:7245d8635ac7
6945 6945
6946 if (prog->reghasz == REX_SET) 6946 if (prog->reghasz == REX_SET)
6947 { 6947 {
6948 cleanup_zsubexpr(); 6948 cleanup_zsubexpr();
6949 re_extmatch_out = make_extmatch(); 6949 re_extmatch_out = make_extmatch();
6950 for (i = 0; i < subs.synt.in_use; i++) 6950 /* Loop over \z1, \z2, etc. There is no \z0. */
6951 for (i = 1; i < subs.synt.in_use; i++)
6951 { 6952 {
6952 if (REG_MULTI) 6953 if (REG_MULTI)
6953 { 6954 {
6954 struct multipos *mpos = &subs.synt.list.multi[i]; 6955 struct multipos *mpos = &subs.synt.list.multi[i];
6955 6956