Module: wine Branch: master Commit: 030abff4ac849df1fcda3ac345cbbdad4ce9575f URL: http://source.winehq.org/git/wine.git/?a=commit;h=030abff4ac849df1fcda3ac345...
Author: Evan Stade estade@gmail.com Date: Mon Jul 30 19:09:02 2007 -0700
gdi32: Improve ExtCreatePen parameter checking.
---
dlls/gdi32/pen.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
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, DWORD width,
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;