c770959
To: vim_dev@googlegroups.com
c770959
Subject: Patch 7.4.003
c770959
Fcc: outbox
c770959
From: Bram Moolenaar <Bram@moolenaar.net>
c770959
Mime-Version: 1.0
c770959
Content-Type: text/plain; charset=UTF-8
c770959
Content-Transfer-Encoding: 8bit
c770959
------------
c770959
c770959
Patch 7.4.003
c770959
Problem:    Memory access error in Ruby syntax highlighting. (Christopher Chow)
c770959
Solution:   Refresh stale pointer. (James McCoy)
c770959
Files:	    src/regexp_nfa.c
c770959
c770959
c770959
*** ../vim-7.4.002/src/regexp_nfa.c	2013-08-14 13:31:03.000000000 +0200
c770959
--- src/regexp_nfa.c	2013-08-14 14:02:06.000000000 +0200
c770959
***************
c770959
*** 4120,4126 ****
c770959
  		sub = &subs->norm;
c770959
  	    }
c770959
  #ifdef FEAT_SYN_HL
c770959
! 	    else if (state->c >= NFA_ZOPEN)
c770959
  	    {
c770959
  		subidx = state->c - NFA_ZOPEN;
c770959
  		sub = &subs->synt;
c770959
--- 4120,4126 ----
c770959
  		sub = &subs->norm;
c770959
  	    }
c770959
  #ifdef FEAT_SYN_HL
c770959
! 	    else if (state->c >= NFA_ZOPEN && state->c <= NFA_ZOPEN9)
c770959
  	    {
c770959
  		subidx = state->c - NFA_ZOPEN;
c770959
  		sub = &subs->synt;
c770959
***************
c770959
*** 4189,4194 ****
c770959
--- 4189,4201 ----
c770959
  	    }
c770959
  
c770959
  	    subs = addstate(l, state->out, subs, pim, off);
c770959
+ 	    /* "subs" may have changed, need to set "sub" again */
c770959
+ #ifdef FEAT_SYN_HL
c770959
+ 	    if (state->c >= NFA_ZOPEN && state->c <= NFA_ZOPEN9)
c770959
+ 		sub = &subs->synt;
c770959
+ 	    else
c770959
+ #endif
c770959
+ 		sub = &subs->norm;
c770959
  
c770959
  	    if (save_in_use == -1)
c770959
  	    {
c770959
***************
c770959
*** 4237,4243 ****
c770959
  		sub = &subs->norm;
c770959
  	    }
c770959
  #ifdef FEAT_SYN_HL
c770959
! 	    else if (state->c >= NFA_ZCLOSE)
c770959
  	    {
c770959
  		subidx = state->c - NFA_ZCLOSE;
c770959
  		sub = &subs->synt;
c770959
--- 4244,4250 ----
c770959
  		sub = &subs->norm;
c770959
  	    }
c770959
  #ifdef FEAT_SYN_HL
c770959
! 	    else if (state->c >= NFA_ZCLOSE && state->c <= NFA_ZCLOSE9)
c770959
  	    {
c770959
  		subidx = state->c - NFA_ZCLOSE;
c770959
  		sub = &subs->synt;
c770959
***************
c770959
*** 4281,4286 ****
c770959
--- 4288,4300 ----
c770959
  	    }
c770959
  
c770959
  	    subs = addstate(l, state->out, subs, pim, off);
c770959
+ 	    /* "subs" may have changed, need to set "sub" again */
c770959
+ #ifdef FEAT_SYN_HL
c770959
+ 	    if (state->c >= NFA_ZCLOSE && state->c <= NFA_ZCLOSE9)
c770959
+ 		sub = &subs->synt;
c770959
+ 	    else
c770959
+ #endif
c770959
+ 		sub = &subs->norm;
c770959
  
c770959
  	    if (REG_MULTI)
c770959
  		sub->list.multi[subidx].end = save_lpos;
c770959
*** ../vim-7.4.002/src/version.c	2013-08-14 13:31:03.000000000 +0200
c770959
--- src/version.c	2013-08-14 14:03:51.000000000 +0200
c770959
***************
c770959
*** 729,730 ****
c770959
--- 729,732 ----
c770959
  {   /* Add new patch number below this line */
c770959
+ /**/
c770959
+     3,
c770959
  /**/
c770959
c770959
-- 
c770959
Where do you want to crash today?
c770959
c770959
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
c770959
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
c770959
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
c770959
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///