Blob Blame History Raw
To: vim-dev@vim.org
Subject: Patch 7.1.170
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.170
Problem:    Valgrind warning for overlapping arguments for strcpy().
Solution:   Use mch_memmove() instead. (Dominique Pelle)
Files:	    src/getchar.c


*** ../vim-7.1.169/src/getchar.c	Thu Sep 13 18:25:08 2007
--- src/getchar.c	Mon Dec  3 20:42:29 2007
***************
*** 253,260 ****
  	return;
      }
      else if (buf->bh_index != 0)
! 	STRCPY(buf->bh_first.b_next->b_str,
! 				 buf->bh_first.b_next->b_str + buf->bh_index);
      buf->bh_index = 0;
  
      if (buf->bh_space >= (int)slen)
--- 253,261 ----
  	return;
      }
      else if (buf->bh_index != 0)
! 	mch_memmove(buf->bh_first.b_next->b_str,
! 		    buf->bh_first.b_next->b_str + buf->bh_index,
! 		    STRLEN(buf->bh_first.b_next->b_str + buf->bh_index) + 1);
      buf->bh_index = 0;
  
      if (buf->bh_space >= (int)slen)
*** ../vim-7.1.169/src/version.c	Fri Dec  7 17:08:35 2007
--- src/version.c	Fri Dec  7 17:27:13 2007
***************
*** 668,669 ****
--- 668,671 ----
  {   /* Add new patch number below this line */
+ /**/
+     170,
  /**/

-- 
Some of the well know MS-Windows errors:
	ESLEEP		Operator fell asleep
	ENOERR		No error yet
	EDOLLAR		OS too expensive
	EWINDOWS	MS-Windows loaded, system in danger

 /// 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    ///