99b86a7
To: vim-dev@vim.org
99b86a7
Subject: patch 7.1.037
99b86a7
Fcc: outbox
99b86a7
From: Bram Moolenaar <Bram@moolenaar.net>
99b86a7
Mime-Version: 1.0
99b86a7
Content-Type: text/plain; charset=ISO-8859-1
99b86a7
Content-Transfer-Encoding: 8bit
99b86a7
------------
99b86a7
99b86a7
Patch 7.1.037
99b86a7
Problem:    strcpy() used for overlapping strings. (Chris Monson)
99b86a7
Solution:   Use mch_memmove() instead.
99b86a7
Files:	    src/option.c
99b86a7
99b86a7
99b86a7
*** ../vim-7.1.036/src/option.c	Tue Jul 24 09:50:22 2007
99b86a7
--- src/option.c	Sun Jul 22 16:42:47 2007
99b86a7
***************
99b86a7
*** 4628,4634 ****
99b86a7
  				    if ((!(flags & P_COMMA) || *s != ',')
99b86a7
  					    && vim_strchr(s + 1, *s) != NULL)
99b86a7
  				    {
99b86a7
! 					STRCPY(s, s + 1);
99b86a7
  					--s;
99b86a7
  				    }
99b86a7
  			    }
99b86a7
--- 4628,4634 ----
99b86a7
  				    if ((!(flags & P_COMMA) || *s != ',')
99b86a7
  					    && vim_strchr(s + 1, *s) != NULL)
99b86a7
  				    {
99b86a7
! 					mch_memmove(s, s + 1, STRLEN(s));
99b86a7
  					--s;
99b86a7
  				    }
99b86a7
  			    }
99b86a7
*** ../vim-7.1.036/src/version.c	Tue Jul 24 14:32:44 2007
99b86a7
--- src/version.c	Tue Jul 24 14:56:03 2007
99b86a7
***************
99b86a7
*** 668,669 ****
99b86a7
--- 668,671 ----
99b86a7
  {   /* Add new patch number below this line */
99b86a7
+ /**/
99b86a7
+     37,
99b86a7
  /**/
99b86a7
99b86a7
-- 
99b86a7
This planet has -- or rather had -- a problem, which was this: most
99b86a7
of the people living on it were unhappy for pretty much of the time.
99b86a7
Many solutions were suggested for this problem, but most of these
99b86a7
were largely concerned with the movements of small green pieces of
99b86a7
paper, which is odd because on the whole it wasn't the small green
99b86a7
pieces of paper that were unhappy.
99b86a7
		-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
99b86a7
99b86a7
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
99b86a7
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
99b86a7
\\\        download, build and distribute -- http://www.A-A-P.org        ///
99b86a7
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///