* doc.c (Fsnarf_documentation): Use memmove instead of memcpy as
authorAri Roponen <ari.roponen@gmail.com>
Tue, 21 Sep 2010 19:33:59 +0000 (21:33 +0200)
committerAndreas Schwab <schwab@linux-m68k.org>
Tue, 21 Sep 2010 19:33:59 +0000 (21:33 +0200)
the regions may overlap.

src/ChangeLog
src/doc.c

index 90e21b7..95c00f3 100644 (file)
@@ -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.
index f8ab9d0..36f7c0e 100644 (file)
--- a/src/doc.c
+++ b/src/doc.c
@@ -678,7 +678,7 @@ the same file name is found in the `doc-directory'.  */)
        }
       pos += end - buf;
       filled -= end - buf;
-      memcpy (buf, end, filled);
+      memmove (buf, end, filled);
     }
   emacs_close (fd);
   return Qnil;