Commit 32bfd810 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

windowscodecs: Allow CopyPixels to succeed without padding from the last row.

parent 1742012f
......@@ -82,7 +82,7 @@ HRESULT copy_pixels(UINT bpp, const BYTE *srcbuffer,
if (dststride < bytesperrow)
return E_INVALIDARG;
if ((dststride * rc->Height) > dstbuffersize)
if ((dststride * (rc->Height-1)) + ((rc->Width * bpp) + 7)/8 > dstbuffersize)
return E_INVALIDARG;
/* if the whole bitmap is copied and the buffer format matches then it's a matter of a single memcpy */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment