Karsten Hopp e4c1a5
To: vim-dev@vim.org
Karsten Hopp e4c1a5
Subject: Patch 7.1.164
Karsten Hopp e4c1a5
Fcc: outbox
Karsten Hopp e4c1a5
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp e4c1a5
Mime-Version: 1.0
Karsten Hopp e4c1a5
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp e4c1a5
Content-Transfer-Encoding: 8bit
Karsten Hopp e4c1a5
------------
Karsten Hopp e4c1a5
Karsten Hopp e4c1a5
Patch 7.1.164
Karsten Hopp e4c1a5
Problem:    Reading past end of regexp pattern. (Dominique Pelle)
Karsten Hopp e4c1a5
Solution:   Use utf_ptr2len().
Karsten Hopp e4c1a5
Files:	    src/regexp.c
Karsten Hopp e4c1a5
Karsten Hopp e4c1a5
Karsten Hopp e4c1a5
*** ../vim-7.1.163/src/regexp.c	Sat Aug 11 13:57:31 2007
Karsten Hopp e4c1a5
--- src/regexp.c	Sat Nov 24 13:23:53 2007
Karsten Hopp e4c1a5
***************
Karsten Hopp e4c1a5
*** 2770,2776 ****
Karsten Hopp e4c1a5
      {
Karsten Hopp e4c1a5
  #ifdef FEAT_MBYTE
Karsten Hopp e4c1a5
  	if (enc_utf8)
Karsten Hopp e4c1a5
! 	    prevchr_len += utf_char2len(mb_ptr2char(regparse + prevchr_len));
Karsten Hopp e4c1a5
  	else if (has_mbyte)
Karsten Hopp e4c1a5
  	    prevchr_len += (*mb_ptr2len)(regparse + prevchr_len);
Karsten Hopp e4c1a5
  	else
Karsten Hopp e4c1a5
--- 2770,2777 ----
Karsten Hopp e4c1a5
      {
Karsten Hopp e4c1a5
  #ifdef FEAT_MBYTE
Karsten Hopp e4c1a5
  	if (enc_utf8)
Karsten Hopp e4c1a5
! 	    /* exclude composing chars that mb_ptr2len does include */
Karsten Hopp e4c1a5
! 	    prevchr_len += utf_ptr2len(regparse + prevchr_len);
Karsten Hopp e4c1a5
  	else if (has_mbyte)
Karsten Hopp e4c1a5
  	    prevchr_len += (*mb_ptr2len)(regparse + prevchr_len);
Karsten Hopp e4c1a5
  	else
Karsten Hopp e4c1a5
*** ../vim-7.1.163/src/version.c	Thu Nov 29 17:46:01 2007
Karsten Hopp e4c1a5
--- src/version.c	Thu Nov 29 21:25:45 2007
Karsten Hopp e4c1a5
***************
Karsten Hopp e4c1a5
*** 668,669 ****
Karsten Hopp e4c1a5
--- 668,671 ----
Karsten Hopp e4c1a5
  {   /* Add new patch number below this line */
Karsten Hopp e4c1a5
+ /**/
Karsten Hopp e4c1a5
+     164,
Karsten Hopp e4c1a5
  /**/
Karsten Hopp e4c1a5
Karsten Hopp e4c1a5
-- 
Karsten Hopp e4c1a5
Send $25.00 for handy leaflet on how to make money by selling leaflets
Karsten Hopp e4c1a5
Karsten Hopp e4c1a5
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp e4c1a5
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp e4c1a5
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp e4c1a5
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///