home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.3 / 7.3.1258 < prev    next >
Encoding:
Internet Message Format  |  2013-06-27  |  1.8 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.1258
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.3.1258
  11. Problem:    Using submatch() may crash Vim. (Ingo Karkat)
  12. Solution:   Restore the number of subexpressions used.
  13. Files:        src/regexp_nfa.c
  14.  
  15.  
  16. *** ../vim-7.3.1257/src/regexp_nfa.c    2013-06-26 18:16:55.000000000 +0200
  17. --- src/regexp_nfa.c    2013-06-28 22:59:38.000000000 +0200
  18. ***************
  19. *** 5198,5203 ****
  20. --- 5198,5205 ----
  21.                || t->state->c == NFA_START_INVISIBLE_BEFORE_FIRST
  22.                || t->state->c == NFA_START_INVISIBLE_BEFORE_NEG_FIRST)
  23.               {
  24. +             int in_use = m->norm.in_use;
  25.               /* Copy submatch info for the recursive call, so that
  26.                * \1 can be matched. */
  27.               copy_sub_off(&m->norm, &t->subs.norm);
  28. ***************
  29. *** 5231,5236 ****
  30. --- 5233,5239 ----
  31.                   add_here = TRUE;
  32.                   add_state = t->state->out1->out;
  33.               }
  34. +             m->norm.in_use = in_use;
  35.               }
  36.               else
  37.               {
  38. *** ../vim-7.3.1257/src/version.c    2013-06-28 20:36:26.000000000 +0200
  39. --- src/version.c    2013-06-28 23:00:55.000000000 +0200
  40. ***************
  41. *** 730,731 ****
  42. --- 730,733 ----
  43.   {   /* Add new patch number below this line */
  44. + /**/
  45. +     1258,
  46.   /**/
  47.  
  48.  
  49. -- 
  50. GUARD #1:  What, ridden on a horse?
  51. ARTHUR:    Yes!
  52. GUARD #1:  You're using coconuts!
  53. ARTHUR:    What?
  54. GUARD #1:  You've got two empty halves of coconut and you're bangin' 'em
  55.            together.
  56.                                   The Quest for the Holy Grail (Monty Python)
  57.  
  58.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  59. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  60. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  61.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  62.