Author: tfaber
Date: Sat Aug 8 14:57:47 2015
New Revision: 68630
URL:
http://svn.reactos.org/svn/reactos?rev=68630&view=rev
Log:
[WIN32K:NTGDI]
- Improve invalid parameter handling in IntGdiExtCreatePen. Patch by Benedikt Freisen.
CORE-9740 #resolve
Modified:
trunk/reactos/win32ss/gdi/ntgdi/pen.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/pen.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/pen.c?re…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/pen.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/pen.c [iso-8859-1] Sat Aug 8 14:57:47 2015
@@ -135,6 +135,9 @@
// If dwPenStyle is PS_COSMETIC, the width must be set to 1.
if ( !(bOldStylePen) && ((dwPenStyle & PS_TYPE_MASK) == PS_COSMETIC)
&& ( dwWidth != 1) )
goto ExitCleanup;
+ // If dwPenStyle is PS_COSMETIC, the brush style must be BS_SOLID.
+ if ( !(bOldStylePen) && ((dwPenStyle & PS_TYPE_MASK) == PS_COSMETIC)
&& (ulBrushStyle != BS_SOLID) )
+ goto ExitCleanup;
switch (dwPenStyle & PS_STYLE_MASK)
{
@@ -205,6 +208,7 @@
default:
DPRINT1("IntGdiExtCreatePen unknown penstyle %x\n", dwPenStyle);
+ goto ExitCleanup;
}
PEN_UnlockPen(pbrushPen);