From aec6311fb516e974f67649bb82fa4ed0e7a85ee9 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sun, 30 Sep 2012 21:21:03 +0000 Subject: [PATCH] [WIN32K] Hack around completely broken GreGetDIBitsInternal. Fixes bugcheck caused by gdi32_winetest bitmap. svn path=/trunk/; revision=57444 --- reactos/win32ss/gdi/ntgdi/dibobj.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/reactos/win32ss/gdi/ntgdi/dibobj.c b/reactos/win32ss/gdi/ntgdi/dibobj.c index bd64148fbe5..81278b44550 100644 --- a/reactos/win32ss/gdi/ntgdi/dibobj.c +++ b/reactos/win32ss/gdi/ntgdi/dibobj.c @@ -1020,6 +1020,10 @@ NtGdiGetDIBitsInternal( /* Use maximum size */ cjMaxInfo = min(cjMaxInfo, sizeof(BITMAPV5HEADER) + 256 * sizeof(RGBQUAD)); + // HACK: the underlying code sucks and doesn't care for the size, so we + // give it the maximum ever needed + cjMaxInfo = sizeof(BITMAPV5HEADER) + 256 * sizeof(RGBQUAD); + /* Allocate a buffer the bitmapinfo */ pbmi = ExAllocatePoolWithTag(PagedPool, cjMaxInfo, 'imBG'); if (!pbmi)