mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 05:10:36 +00:00
windowscodecs: Allocate correct amount of memory for PNG image data.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Vincent Povirk <vincent@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
aad6fb4a42
commit
2f74d91d87
|
@ -664,7 +664,7 @@ static HRESULT WINAPI PngDecoder_Initialize(IWICBitmapDecoder *iface, IStream *p
|
|||
/* read the image data */
|
||||
This->width = ppng_get_image_width(This->png_ptr, This->info_ptr);
|
||||
This->height = ppng_get_image_height(This->png_ptr, This->info_ptr);
|
||||
This->stride = This->width * This->bpp;
|
||||
This->stride = (This->width * This->bpp + 7) / 8;
|
||||
image_size = This->stride * This->height;
|
||||
|
||||
This->image_bits = HeapAlloc(GetProcessHeap(), 0, image_size);
|
||||
|
|
Loading…
Reference in a new issue