Author: tkreuzer Date: Tue Apr 14 20:06:07 2009 New Revision: 40502
URL: http://svn.reactos.org/svn/reactos?rev=40502&view=rev Log: Return NULL, if failed to lock the provided palette in InrEngCreateXlate. Fixes bug 4378. See issue #4378 for more details.
Modified: trunk/reactos/subsystems/win32/win32k/eng/xlate.c
Modified: trunk/reactos/subsystems/win32/win32k/eng/xlate.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/eng... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/xlate.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/xlate.c [iso-8859-1] Tue Apr 14 20:06:07 2009 @@ -177,9 +177,23 @@ DestPalGDI = PALETTE_LockPalette(PaletteDest);
if (SourcePalType == 0) + { + if (!SourcePalGDI) + { + DPRINT1("Failed to lock source palette %p\n", PaletteSource); + return NULL; + } SourcePalType = SourcePalGDI->Mode; + } if (DestPalType == 0) + { + if (!DestPalGDI) + { + DPRINT1("Failed to lock dest palette %p\n", PaletteDest); + return NULL; + } DestPalType = DestPalGDI->Mode; + }
XlateObj->iSrcType = SourcePalType; XlateObj->iDstType = DestPalType;