Author: tkreuzer
Date: Wed Mar 25 22:26:52 2015
New Revision: 66883
URL:
http://svn.reactos.org/svn/reactos?rev=66883&view=rev
Log:
[WIN32K]
- Handle allocation failures in FixupDIBBrushPalette
- In IntCreateDIBitmap make sure to the absolute height to GreCreateBitmap
Modified:
trunk/reactos/win32ss/gdi/eng/engbrush.c
trunk/reactos/win32ss/gdi/ntgdi/dibobj.c
Modified: trunk/reactos/win32ss/gdi/eng/engbrush.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/engbrush.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/engbrush.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/engbrush.c [iso-8859-1] Wed Mar 25 22:26:52 2015
@@ -9,7 +9,7 @@
#include <win32k.h>
-DBG_DEFAULT_CHANNEL(GdiFont);
+DBG_DEFAULT_CHANNEL(EngBrush);
static const ULONG gaulHatchBrushes[HS_DDI_MAX][8] =
{
@@ -271,6 +271,11 @@
0,
0,
0);
+ if (ppalNew == NULL)
+ {
+ ERR("Failed to allcate palette for brush\n");
+ return NULL;
+ }
/* Loop all colors */
for (i = 0; i < ppalDIB->NumColors; i++)
@@ -357,6 +362,12 @@
{
/* Create a palette with the colors from the DC */
ppalPattern = FixupDIBBrushPalette(psurfPattern->ppal, pebo->ppalDC);
+ if (ppalPattern == NULL)
+ {
+ ERR("FixupDIBBrushPalette() failed.\n");
+ return FALSE;
+ }
+
pebo->ppalDIB = ppalPattern;
}
else
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] Wed Mar 25 22:26:52 2015
@@ -1379,7 +1379,7 @@
else
{
handle = GreCreateBitmap(width,
- height,
+ abs(height),
1,
1,
NULL);