Karsten Hopp 48816c
To: vim-dev@vim.org
Karsten Hopp 48816c
Subject: Patch 7.1.170
Karsten Hopp 48816c
Fcc: outbox
Karsten Hopp 48816c
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 48816c
Mime-Version: 1.0
Karsten Hopp 48816c
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 48816c
Content-Transfer-Encoding: 8bit
Karsten Hopp 48816c
------------
Karsten Hopp 48816c
Karsten Hopp 48816c
Patch 7.1.170
Karsten Hopp 48816c
Problem:    Valgrind warning for overlapping arguments for strcpy().
Karsten Hopp 48816c
Solution:   Use mch_memmove() instead. (Dominique Pelle)
Karsten Hopp 48816c
Files:	    src/getchar.c
Karsten Hopp 48816c
Karsten Hopp 48816c
Karsten Hopp 48816c
*** ../vim-7.1.169/src/getchar.c	Thu Sep 13 18:25:08 2007
Karsten Hopp 48816c
--- src/getchar.c	Mon Dec  3 20:42:29 2007
Karsten Hopp 48816c
***************
Karsten Hopp 48816c
*** 253,260 ****
Karsten Hopp 48816c
  	return;
Karsten Hopp 48816c
      }
Karsten Hopp 48816c
      else if (buf->bh_index != 0)
Karsten Hopp 48816c
! 	STRCPY(buf->bh_first.b_next->b_str,
Karsten Hopp 48816c
! 				 buf->bh_first.b_next->b_str + buf->bh_index);
Karsten Hopp 48816c
      buf->bh_index = 0;
Karsten Hopp 48816c
  
Karsten Hopp 48816c
      if (buf->bh_space >= (int)slen)
Karsten Hopp 48816c
--- 253,261 ----
Karsten Hopp 48816c
  	return;
Karsten Hopp 48816c
      }
Karsten Hopp 48816c
      else if (buf->bh_index != 0)
Karsten Hopp 48816c
! 	mch_memmove(buf->bh_first.b_next->b_str,
Karsten Hopp 48816c
! 		    buf->bh_first.b_next->b_str + buf->bh_index,
Karsten Hopp 48816c
! 		    STRLEN(buf->bh_first.b_next->b_str + buf->bh_index) + 1);
Karsten Hopp 48816c
      buf->bh_index = 0;
Karsten Hopp 48816c
  
Karsten Hopp 48816c
      if (buf->bh_space >= (int)slen)
Karsten Hopp 48816c
*** ../vim-7.1.169/src/version.c	Fri Dec  7 17:08:35 2007
Karsten Hopp 48816c
--- src/version.c	Fri Dec  7 17:27:13 2007
Karsten Hopp 48816c
***************
Karsten Hopp 48816c
*** 668,669 ****
Karsten Hopp 48816c
--- 668,671 ----
Karsten Hopp 48816c
  {   /* Add new patch number below this line */
Karsten Hopp 48816c
+ /**/
Karsten Hopp 48816c
+     170,
Karsten Hopp 48816c
  /**/
Karsten Hopp 48816c
Karsten Hopp 48816c
-- 
Karsten Hopp 48816c
Some of the well know MS-Windows errors:
Karsten Hopp 48816c
	ESLEEP		Operator fell asleep
Karsten Hopp 48816c
	ENOERR		No error yet
Karsten Hopp 48816c
	EDOLLAR		OS too expensive
Karsten Hopp 48816c
	EWINDOWS	MS-Windows loaded, system in danger
Karsten Hopp 48816c
Karsten Hopp 48816c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 48816c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 48816c
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 48816c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///