changeset 4768:0f5bee973a7b

Etags: use memmove instead of strcpy to move characters within a string. See <870180fe0912080852t1073137ence150b6d267c43c9@mail.gmail.com> in xemacs-patches.
author Jerry James <james@xemacs.org>
date Wed, 09 Dec 2009 09:50:36 -0700
parents dba492ef7440
children 5460287a3327
files lib-src/ChangeLog lib-src/etags.c
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/ChangeLog	Sat Dec 05 01:04:17 2009 +0900
+++ b/lib-src/ChangeLog	Wed Dec 09 09:50:36 2009 -0700
@@ -1,3 +1,8 @@
+2009-12-08  Sjoerd Mullender  <sjoerd@acm.org>
+
+	* etags.c (absolute_filename): Use memmove instead of strcpy to move
+	characters within a string.
+
 2009-11-10  Jerry James  <james@xemacs.org>
 
 	* fakemail.c (MAIL_PROGRAM_NAME): No s&m files define this now, so
--- a/lib-src/etags.c	Sat Dec 05 01:04:17 2009 +0900
+++ b/lib-src/etags.c	Wed Dec 09 09:50:36 2009 -0700
@@ -6829,13 +6829,13 @@
 	      else if (cp[0] != '/')
 		cp = slashp;
 #endif
-	      strcpy (cp, slashp + 3);
+	      memmove (cp, slashp + 3, strlen (slashp + 3) + 1);
 	      slashp = cp;
 	      continue;
 	    }
 	  else if (slashp[2] == '/' || slashp[2] == '\0')
 	    {
-	      strcpy (slashp, slashp + 2);
+	      memmove (slashp, slashp + 2, strlen (slashp + 2) + 1);
 	      continue;
 	    }
 	}