Author: fireball Date: Thu Feb 24 11:12:18 2011 New Revision: 50889
URL: http://svn.reactos.org/svn/reactos?rev=50889&view=rev Log: - The very first victim of DPH monitoring: Fix user-provided glyph buffer overread. - P.S. Arwinss just happen to be my experimental set up right now, so DPH is first tested there and once it works it's gonna be applied to trunk.
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c
Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32... ============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gre/font.c [iso-8859-1] Thu Feb 24 11:12:18 2011 @@ -270,10 +270,11 @@ { src = srcLine; srcLine += stride; - bits = *src++;
for (w=0;w<width;w++) { + bits = *src++; + if (bits == 0xff) { DibPutPixel(&pCharSurf->SurfObj, w, h, xlBrushColor); @@ -286,8 +287,6 @@ bVal = ((UCHAR)~bits * (USHORT)GetBValue(srcColor) + bits * (USHORT)GetBValue(xlBrushColor)) >> 8; DibPutPixel(&pCharSurf->SurfObj, w, h, RGB(rVal, gVal, bVal)); } - - bits = *src++; } }