Blob Blame History Raw
To: vim-dev@vim.org
Subject: Patch 7.1.319
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 7.1.319
Problem:    When a register has an illegal utf-8 sequence, pasting it on the
	    command line causes an illegal memory access.
Solution:   Use mb_cptr2char_adv(). (Dominique Pelle)
Files:	    src/ex_getln.c


*** ../vim-7.1.318/src/ex_getln.c	Thu May 29 15:33:13 2008
--- src/ex_getln.c	Mon Jun  9 20:10:51 2008
***************
*** 3032,3041 ****
  		++s;
  #ifdef FEAT_MBYTE
  	    if (has_mbyte)
! 	    {
! 		c = mb_ptr2char(s);
! 		s += mb_char2len(c);
! 	    }
  	    else
  #endif
  		c = *s++;
--- 3033,3039 ----
  		++s;
  #ifdef FEAT_MBYTE
  	    if (has_mbyte)
! 		c = mb_cptr2char_adv(&s);
  	    else
  #endif
  		c = *s++;
*** ../vim-7.1.318/src/version.c	Fri Jun 20 11:58:27 2008
--- src/version.c	Fri Jun 20 12:53:16 2008
***************
*** 668,669 ****
--- 673,676 ----
  {   /* Add new patch number below this line */
+ /**/
+     319,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
46. Your wife makes a new rule: "The computer cannot come to bed."

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///