From 840b985a766f76b61aaa353cba71ce90cb0fc9ed Mon Sep 17 00:00:00 2001 From: Ari Roponen Date: Tue, 21 Sep 2010 21:33:59 +0200 Subject: [PATCH] * doc.c (Fsnarf_documentation): Use memmove instead of memcpy as the regions may overlap. --- src/ChangeLog | 5 +++++ src/doc.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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; -- 2.39.5