From 2764ebaf5cee56e24bd557b354d778738641d29c Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 4 Jan 2018 21:42:01 +0100 Subject: [PATCH] kernel: replace memmove in FuncSCR_SIFT_HELPER by memcpy Moving data from an existing perm to a freshly created one cannot overlap --- src/permutat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/permutat.c b/src/permutat.c index d6e4dd13701..d5e7e5916ec 100644 --- a/src/permutat.c +++ b/src/permutat.c @@ -4443,12 +4443,12 @@ Obj FuncSCR_SIFT_HELPER(Obj self, Obj S, Obj g, Obj n) /* Copy g into the buffer */ if (IS_PERM2(g) && useP2) { UInt2 * ptR = ADDR_PERM2(result); - memmove(ptR, CONST_ADDR_PERM2(g),2*dg); + memcpy(ptR, CONST_ADDR_PERM2(g), 2*dg); for ( i = dg; i < nn; i++) ptR[i] = (UInt2)i; } else if (IS_PERM4(g) && !useP2) { UInt4 *ptR = ADDR_PERM4(result); - memmove(ptR,CONST_ADDR_PERM4(g),4*dg); + memcpy(ptR, CONST_ADDR_PERM4(g), 4*dg); for ( i = dg; i