Patch 7.3.1258
Problem:    Using submatch() may crash Vim. (Ingo Karkat)
Solution:   Restore the number of subexpressions used.
Files:      src/regexp_nfa.c


*** ../vim-7.3.1257/src/regexp_nfa.c    2013-06-26 18:16:55.000000000 +0200
--- src/regexp_nfa.c    2013-06-28 22:59:38.000000000 +0200
***************
*** 5198,5203 ****
--- 5198,5205 ----
                         || t->state->c == NFA_START_INVISIBLE_BEFORE_FIRST
                         || t->state->c == NFA_START_INVISIBLE_BEFORE_NEG_FIRST)
                    {
+                       int in_use = m->norm.in_use;
+ 
                        /* Copy submatch info for the recursive call, so that
                         * \1 can be matched. */
                        copy_sub_off(&m->norm, &t->subs.norm);
***************
*** 5231,5236 ****
--- 5233,5239 ----
                            add_here = TRUE;
                            add_state = t->state->out1->out;
                        }
+                       m->norm.in_use = in_use;
                    }
                    else
                    {
*** ../vim-7.3.1257/src/version.c       2013-06-28 20:36:26.000000000 +0200
--- src/version.c       2013-06-28 23:00:55.000000000 +0200
***************
*** 730,731 ****
--- 730,733 ----
  {   /* Add new patch number below this line */
+ /**/
+     1258,
  /**/


-- 
GUARD #1:  What, ridden on a horse?
ARTHUR:    Yes!
GUARD #1:  You're using coconuts!
ARTHUR:    What?
GUARD #1:  You've got two empty halves of coconut and you're bangin' 'em
           together.
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui