Jon Griffiths : oleaut32: Fix memcpy overlapping ranges in SysReAllocStringLen.
Alexandre Julliard
julliard at winehq.org
Mon Jul 7 09:19:26 CDT 2008
Module: wine
Branch: master
Commit: 8c16ae7a7f89fbf4f07211122b89ebe5fab9942c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8c16ae7a7f89fbf4f07211122b89ebe5fab9942c
Author: Jon Griffiths <jon_p_griffiths at yahoo.com>
Date: Sun Jul 6 08:42:27 2008 -0700
oleaut32: Fix memcpy overlapping ranges in SysReAllocStringLen.
---
dlls/oleaut32/oleaut.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c
index 9fdac76..9884416 100644
--- a/dlls/oleaut32/oleaut.c
+++ b/dlls/oleaut32/oleaut.c
@@ -287,7 +287,7 @@ BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
*
* NOTES
* See BSTR(), SysAllocStringByteLen().
- * *pbstr may be changed by this function.
+ * *old may be changed by this function.
*/
int WINAPI SysReAllocStringLen(BSTR* old, const OLECHAR* str, unsigned int len)
{
@@ -301,7 +301,7 @@ int WINAPI SysReAllocStringLen(BSTR* old, const OLECHAR* str, unsigned int len)
*old = (BSTR)(ptr+1);
*ptr = newbytelen;
if (str) {
- memcpy(*old, str, newbytelen);
+ memmove(*old, str, newbytelen);
(*old)[len] = 0;
} else {
/* Subtle hidden feature: The old string data is still there
More information about the wine-cvs
mailing list