changeset 110463:3132ab826fc5

* doc.c (Fsnarf_documentation): Use memmove instead of memcpy as the regions may overlap.
author Andreas Schwab <schwab@linux-m68k.org>
date Tue, 21 Sep 2010 21:33:59 +0200
parents 23f268fa978d
children 27917ce150c1
files src/ChangeLog src/doc.c
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Sep 21 14:49:59 2010 +0200
+++ b/src/ChangeLog	Tue Sep 21 21:33:59 2010 +0200
@@ -1,3 +1,8 @@
+2010-09-21  Ari Roponen  <ari.roponen@gmail.com>  (tiny change)
+
+	* doc.c (Fsnarf_documentation): Use memmove instead of memcpy as
+	the regions may overlap.
+
 2010-09-21  Juanma Barranquero  <lekktu@gmail.com>
 
 	* makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
--- a/src/doc.c	Tue Sep 21 14:49:59 2010 +0200
+++ b/src/doc.c	Tue Sep 21 21:33:59 2010 +0200
@@ -678,7 +678,7 @@
 	}
       pos += end - buf;
       filled -= end - buf;
-      memcpy (buf, end, filled);
+      memmove (buf, end, filled);
     }
   emacs_close (fd);
   return Qnil;