From: Ari Roponen Date: Tue, 21 Sep 2010 19:33:59 +0000 (+0200) Subject: * doc.c (Fsnarf_documentation): Use memmove instead of memcpy as X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~47^2~44^2~4 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=840b985a766f76b61aaa353cba71ce90cb0fc9ed;p=emacs.git * doc.c (Fsnarf_documentation): Use memmove instead of memcpy as the regions may overlap. --- diff --git a/src/ChangeLog b/src/ChangeLog index 90e21b7bda9..95c00f38c1f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-09-21 Ari Roponen (tiny change) + + * doc.c (Fsnarf_documentation): Use memmove instead of memcpy as + the regions may overlap. + 2010-09-21 Juanma Barranquero * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies. diff --git a/src/doc.c b/src/doc.c index f8ab9d081b9..36f7c0e882a 100644 --- 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;