Author: tkreuzer
Date: Tue May 8 16:21:27 2012
New Revision: 56543
URL:
http://svn.reactos.org/svn/reactos?rev=56543&view=rev
Log:
[WIN32K]
Fix crashes due to CreateDIBitmap tests
Modified:
trunk/reactos/win32ss/gdi/ntgdi/dibobj.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/dibobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dibobj.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/dibobj.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/dibobj.c [iso-8859-1] Tue May 8 16:21:27 2012
@@ -406,6 +406,8 @@
POINTL ptSrc;
EXLATEOBJ exlo;
PPALETTE ppalDIB = 0;
+
+ if (!bmi) return 0;
SourceBitmap = GreCreateBitmapEx(bmi->bmiHeader.biWidth,
ScanLines,
@@ -1380,6 +1382,7 @@
if(pjInit && (fInit == CBM_INIT))
{
+ if (cjMaxBits == 0) return NULL;
safeBits = ExAllocatePoolWithTag(PagedPool, cjMaxBits, TAG_DIB);
if(!safeBits)
{