To: vim_dev@googlegroups.com Subject: Patch 7.4.937 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.937 Problem: Segfault reading unitialized memory. Solution: Do not read match \z0, it does not exist. (Marius Gedminas, closes #497) Files: src/regexp_nfa.c *** ../vim-7.4.936/src/regexp_nfa.c 2015-09-29 15:06:10.779577806 +0200 --- src/regexp_nfa.c 2015-11-24 15:10:41.405972825 +0100 *************** *** 6947,6953 **** { cleanup_zsubexpr(); re_extmatch_out = make_extmatch(); ! for (i = 0; i < subs.synt.in_use; i++) { if (REG_MULTI) { --- 6947,6954 ---- { cleanup_zsubexpr(); re_extmatch_out = make_extmatch(); ! /* Loop over \z1, \z2, etc. There is no \z0. */ ! for (i = 1; i < subs.synt.in_use; i++) { if (REG_MULTI) { *** ../vim-7.4.936/src/version.c 2015-11-22 19:39:33.610108980 +0100 --- src/version.c 2015-11-24 15:12:26.720811608 +0100 *************** *** 743,744 **** --- 743,746 ---- { /* Add new patch number below this line */ + /**/ + 937, /**/ -- Don't drink and drive. You might hit a bump and spill your beer. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///