https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6b8a981010eba38d77dc1bbd6fff936c1b933d7a

commit 6b8a981010eba38d77dc1bbd6fff936c1b933d7a
Author:     Timo Kreuzer <[email protected]>
AuthorDate: Fri Oct 5 17:38:48 2018 +0300
Commit:     Timo Kreuzer <[email protected]>
CommitDate: Thu Feb 2 14:58:08 2023 +0100

    [WINESYNC] msvcrt: Use memmove to copy memory in wmemcpy_s.
    
    Fixes memory corruption in Outlook 2016.
    
    Signed-off-by: Jacek Caban <[email protected]>
    Signed-off-by: Piotr Caban <[email protected]>
    Signed-off-by: Alexandre Julliard <[email protected]>
    
    wine commit id be56a83fd00cdaf9583a973b1e041f47c5277768 by Jacek Caban 
<[email protected]>
---
 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

Reply via email to