Patch 8.0.1517
Problem:    Invalid memory acces with pattern using look-behind match.
            (Dominique Pelle)
Solution:   Get a pointer to the right line.
Files:      src/regexp.c


*** ../vim-8.0.1516/src/regexp.c        2018-02-10 18:45:21.084822043 +0100
--- src/regexp.c        2018-02-13 16:28:11.106080820 +0100
***************
*** 5585,5593 ****
                    {
  #ifdef FEAT_MBYTE
                        if (has_mbyte)
                            rp->rs_un.regsave.rs_u.pos.col -=
!                               (*mb_head_off)(regline, regline
                                    + rp->rs_un.regsave.rs_u.pos.col - 1) + 1;
                        else
  #endif
                            --rp->rs_un.regsave.rs_u.pos.col;
--- 5585,5598 ----
                    {
  #ifdef FEAT_MBYTE
                        if (has_mbyte)
+                       {
+                           char_u *line =
+                                        reg_getline(behind_pos.rs_u.pos.lnum);
+ 
                            rp->rs_un.regsave.rs_u.pos.col -=
!                               (*mb_head_off)(line, line
                                    + rp->rs_un.regsave.rs_u.pos.col - 1) + 1;
+                       }
                        else
  #endif
                            --rp->rs_un.regsave.rs_u.pos.col;
*** ../vim-8.0.1516/src/version.c       2018-02-13 15:17:49.078578173 +0100
--- src/version.c       2018-02-13 16:34:39.159396037 +0100
***************
*** 773,774 ****
--- 773,776 ----
  {   /* Add new patch number below this line */
+ /**/
+     1517,
  /**/

-- 
FATHER:    You killed eight wedding guests in all!
LAUNCELOT: Er, Well ... the thing is ... I thought your son was a lady.
FATHER:    I can understand that.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- b...@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    ///

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui