Module: wine Branch: master Commit: d2cd9a842ec901c16b6e067bd103bc500887f9ba URL: https://source.winehq.org/git/wine.git/?a=commit;h=d2cd9a842ec901c16b6e067bd... Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Tue Mar 6 09:18:29 2018 +0800 windowscodecs: Fix stride calculation in JPEG decoder. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/jpegformat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/windowscodecs/jpegformat.c b/dlls/windowscodecs/jpegformat.c index 08f1ee7..27cd880 100644 --- a/dlls/windowscodecs/jpegformat.c +++ b/dlls/windowscodecs/jpegformat.c @@ -624,7 +624,7 @@ static HRESULT WINAPI JpegDecoder_Frame_CopyPixels(IWICBitmapFrameDecode *iface, else if (This->cinfo.out_color_space == JCS_CMYK) bpp = 32; else bpp = 24; - stride = bpp * This->cinfo.output_width; + stride = (bpp * This->cinfo.output_width + 7) / 8; data_size = stride * This->cinfo.output_height; max_row_needed = prc->Y + prc->Height;