Dmitry Timoshkov : windowscodecs: Allocate correct amount of memory for PNG image data.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Apr 15 10:00:24 CDT 2016
Module: wine
Branch: master
Commit: 2f74d91d87b20d6f3e131b1afcedb646329ab1af
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2f74d91d87b20d6f3e131b1afcedb646329ab1af
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Thu Apr 14 18:47:50 2016 +0200
windowscodecs: Allocate correct amount of memory for PNG image data.
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/windowscodecs/pngformat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c
index cd9165b..3eb4d0e 100644
--- a/dlls/windowscodecs/pngformat.c
+++ b/dlls/windowscodecs/pngformat.c
@@ -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);
More information about the wine-cvs
mailing list