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 );