And use the more efficient memcpy function since the buffers can't overlap.
Signed-off-by: Alex Henrie alexhenrie24@gmail.com --- dlls/gdi32/enhmetafile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/enhmetafile.c b/dlls/gdi32/enhmetafile.c index a3360c269a..fde9109d1b 100644 --- a/dlls/gdi32/enhmetafile.c +++ b/dlls/gdi32/enhmetafile.c @@ -480,7 +480,9 @@ HENHMETAFILE WINAPI SetEnhMetaFileBits(UINT bufsize, const BYTE *buf) { ENHMETAHEADER *emh = HeapAlloc( GetProcessHeap(), 0, bufsize ); HENHMETAFILE hmf; - memmove(emh, buf, bufsize); + if (!emh) + return NULL; + memcpy(emh, buf, bufsize); hmf = EMF_Create_HENHMETAFILE( emh, bufsize, FALSE ); if (!hmf) HeapFree( GetProcessHeap(), 0, emh );
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=56458
Your paranoid android.
=== debian10 (32 bit Chinese:China report) ===
gdi32: font.c:6304: Test failed: expected vertical face for charset 128, got Droid Sans Fallback font.c:6304: Test failed: expected vertical face for charset 129, got Droid Sans Fallback font.c:6304: Test failed: expected vertical face for charset 130, got Droid Sans Fallback font.c:6304: Test failed: expected vertical face for charset 134, got Droid Sans Fallback font.c:6304: Test failed: expected vertical face for charset 136, got Droid Sans Fallback