oleaut32: Fix memcpy overlapping ranges in SysReAllocStringLen (resend)

Jon Griffiths jon_p_griffiths at yahoo.com
Sun Jul 6 10:42:27 CDT 2008


Hi,

Resending with a bonus documentation fix. Since HeapReAlloc() may return us the same block that we started with, and str may also be the same string we're reallocating (Its valid to use the same source and dest string if you are shrinking it - at least, this works with native), memcpy may overlap, so use memmove instead. Fixes:

Source and destination overlap in memcpy at memcpy
by SysReAllocStringLen (oleaut.c:304)
by test_SysReAllocStringLen (vartype.c:5258)

Cheers
Jon



      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SysReAllocStringLen_overlap.diff
Type: text/x-diff
Size: 829 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080706/ad206769/attachment-0001.diff 


More information about the wine-patches mailing list