[1/4] gdi32: limit PS_USERSTYLE style count to 16

Evan Stade estade at gmail.com
Thu Jul 26 19:13:25 CDT 2007


Hi,

this patch is needed to prevent wine from crashing on the test that
comprises my next patch

 dlls/gdi32/pen.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

-- 
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdi32/pen.c b/dlls/gdi32/pen.c
index fb84788..3dd545b 100644
--- a/dlls/gdi32/pen.c
+++ b/dlls/gdi32/pen.c
@@ -123,7 +123,7 @@ HPEN WINAPI ExtCreatePen( DWORD style, D
 
     if ((style & PS_STYLE_MASK) == PS_USERSTYLE)
     {
-        if (!style_count || !style_bits)
+        if (!style_count || (style_count > 16) || !style_bits)
         {
             SetLastError(ERROR_INVALID_PARAMETER);
             return 0;
-- 
1.4.1


More information about the wine-patches mailing list