From 6b8a981010eba38d77dc1bbd6fff936c1b933d7a Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Fri, 5 Oct 2018 17:38:48 +0300 Subject: [PATCH] [WINESYNC] msvcrt: Use memmove to copy memory in wmemcpy_s. Fixes memory corruption in Outlook 2016. Signed-off-by: Jacek Caban Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard wine commit id be56a83fd00cdaf9583a973b1e041f47c5277768 by Jacek Caban --- sdk/lib/crt/wine/heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/lib/crt/wine/heap.c b/sdk/lib/crt/wine/heap.c index d708d60117a..85a2c81062b 100644 --- a/sdk/lib/crt/wine/heap.c +++ b/sdk/lib/crt/wine/heap.c @@ -849,7 +849,7 @@ int CDECL wmemcpy_s(MSVCRT_wchar_t *dest, MSVCRT_size_t numberOfElements, return MSVCRT_ERANGE; } - memcpy(dest, src, sizeof(MSVCRT_wchar_t)*count); + memmove(dest, src, sizeof(MSVCRT_wchar_t)*count); return 0; } #endif