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.4 / 7.4.051 < prev    next >
Encoding:
Internet Message Format  |  2013-10-05  |  2.0 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.4.051
  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.4.051
  11. Problem:    Syntax highlighting a Yaml file causes a crash. (Blake Preston)
  12. Solution:   Copy the pim structure before calling addstate() to avoid it
  13.         becoming invalide when the state list is reallocated.
  14. Files:        src/regexp_nfa.c
  15.  
  16.  
  17. *** ../vim-7.4.050/src/regexp_nfa.c    2013-09-25 18:16:34.000000000 +0200
  18. --- src/regexp_nfa.c    2013-10-06 15:44:31.000000000 +0200
  19. ***************
  20. *** 6458,6463 ****
  21. --- 6458,6464 ----
  22.           if (add_state != NULL)
  23.           {
  24.           nfa_pim_T *pim;
  25. +         nfa_pim_T pim_copy;
  26.   
  27.           if (t->pim.result == NFA_PIM_UNUSED)
  28.               pim = NULL;
  29. ***************
  30. *** 6531,6536 ****
  31. --- 6532,6546 ----
  32.               pim = NULL;
  33.           }
  34.   
  35. +         /* If "pim" points into l->t it will become invalid when
  36. +          * adding the state causes the list to be reallocated.  Make a
  37. +          * local copy to avoid that. */
  38. +         if (pim == &t->pim)
  39. +         {
  40. +             copy_pim(&pim_copy, pim);
  41. +             pim = &pim_copy;
  42. +         }
  43.           if (add_here)
  44.               addstate_here(thislist, add_state, &t->subs, pim, &listidx);
  45.           else
  46. *** ../vim-7.4.050/src/version.c    2013-10-02 21:54:57.000000000 +0200
  47. --- src/version.c    2013-10-06 15:21:16.000000000 +0200
  48. ***************
  49. *** 740,741 ****
  50. --- 740,743 ----
  51.   {   /* Add new patch number below this line */
  52. + /**/
  53. +     51,
  54.   /**/
  55.  
  56. -- 
  57. GUARD #2:  It could be carried by an African swallow!
  58. GUARD #1:  Oh, yeah, an African swallow maybe, but not a European swallow,
  59.            that's my point.
  60. GUARD #2:  Oh, yeah, I agree with that...
  61.                                   The Quest for the Holy Grail (Monty Python)
  62.  
  63.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  64. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  65. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  66.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  67.