summaryrefslogtreecommitdiff
path: root/Build/source
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-06-03 12:13:40 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-06-03 12:13:40 +0000
commit69393d08f697be1b3e8afecc90e320ba2deb6df9 (patch)
treedb2ac8c448d1a8b822c0fed59c89cc57d739c764 /Build/source
parent0d5797343546e911e6ca0b0cb789d107edcf8a24 (diff)
Bug fix: Use memmove() instead of memcpy() for overlapping objects
git-svn-id: svn://tug.org/texlive/trunk@22759 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r--Build/source/texk/kpathsea/ChangeLog5
-rw-r--r--Build/source/texk/kpathsea/mingw32.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog
index 89add519271..b0d01a9501a 100644
--- a/Build/source/texk/kpathsea/ChangeLog
+++ b/Build/source/texk/kpathsea/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-03 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * mingw32.c (normalize_filename): Use memmove() instead of
+ memcpy() for overlapping objects.
+
2011-05-29 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* texmf.cnf: add "shell_escape.initex = f" and
diff --git a/Build/source/texk/kpathsea/mingw32.c b/Build/source/texk/kpathsea/mingw32.c
index f9716834759..913df2deba5 100644
--- a/Build/source/texk/kpathsea/mingw32.c
+++ b/Build/source/texk/kpathsea/mingw32.c
@@ -186,8 +186,7 @@ normalize_filename (char *fp, char path_sep)
#if 0
fprintf(stderr, "moving %s to %s\n", fp+ret, fp+i);
#endif
- memcpy(fp+ret, fp+i, len);
- *(char *)(fp+ret+len) = '\0';
+ memmove (fp+ret, fp+i, len+1);
}
/* conditionnally rewrite to same path_sep, slash preferably */