8b9a1c
To: vim_dev@googlegroups.com
8b9a1c
Subject: Patch 7.4.025
8b9a1c
Fcc: outbox
8b9a1c
From: Bram Moolenaar <Bram@moolenaar.net>
8b9a1c
Mime-Version: 1.0
8b9a1c
Content-Type: text/plain; charset=UTF-8
8b9a1c
Content-Transfer-Encoding: 8bit
8b9a1c
------------
8b9a1c
8b9a1c
Patch 7.4.025 (after 7.4.019
8b9a1c
Problem:    Reading before start of a string.
8b9a1c
Solution:   Do not call mb_ptr_back() at start of a string. (Dominique Pelle)
8b9a1c
Files:	    src/edit.c
8b9a1c
8b9a1c
8b9a1c
*** ../vim-7.4.024/src/edit.c	2013-09-07 16:35:38.000000000 +0200
8b9a1c
--- src/edit.c	2013-09-08 15:57:20.000000000 +0200
8b9a1c
***************
8b9a1c
*** 5187,5197 ****
8b9a1c
  
8b9a1c
  	    /* Go back to just before the first filename character. */
8b9a1c
  	    mb_ptr_back(line, p);
8b9a1c
! 	    while (vim_isfilec(PTR2CHAR(p)) && p >= line)
8b9a1c
  		mb_ptr_back(line, p);
8b9a1c
! 	    startcol = (int)(p - line);
8b9a1c
  
8b9a1c
! 	    compl_col += ++startcol;
8b9a1c
  	    compl_length = (int)curs_col - startcol;
8b9a1c
  	    compl_pattern = addstar(line + compl_col, compl_length,
8b9a1c
  								EXPAND_FILES);
8b9a1c
--- 5187,5199 ----
8b9a1c
  
8b9a1c
  	    /* Go back to just before the first filename character. */
8b9a1c
  	    mb_ptr_back(line, p);
8b9a1c
! 	    while (p > line && vim_isfilec(PTR2CHAR(p)))
8b9a1c
  		mb_ptr_back(line, p);
8b9a1c
! 	    startcol = (int)(p - line) + 1;
8b9a1c
! 	    if (p == line && vim_isfilec(PTR2CHAR(p)))
8b9a1c
! 		startcol = 0;
8b9a1c
  
8b9a1c
! 	    compl_col += startcol;
8b9a1c
  	    compl_length = (int)curs_col - startcol;
8b9a1c
  	    compl_pattern = addstar(line + compl_col, compl_length,
8b9a1c
  								EXPAND_FILES);
8b9a1c
*** ../vim-7.4.024/src/version.c	2013-09-08 15:40:45.000000000 +0200
8b9a1c
--- src/version.c	2013-09-08 15:52:39.000000000 +0200
8b9a1c
***************
8b9a1c
*** 740,741 ****
8b9a1c
--- 740,743 ----
8b9a1c
  {   /* Add new patch number below this line */
8b9a1c
+ /**/
8b9a1c
+     25,
8b9a1c
  /**/
8b9a1c
8b9a1c
-- 
8b9a1c
hundred-and-one symptoms of being an internet addict:
8b9a1c
188. You purchase a laptop so you can surf while sitting on the can.
8b9a1c
8b9a1c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
8b9a1c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
8b9a1c
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
8b9a1c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///