summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 */