Browse files

2010-07-14 Sebastien Pouliot <sebastien@ximian.com>

	* lineargradientbrush.c: Do not accept empty (width/height) 
	rectangles to create a linear brush. Fix bug #537396


svn path=/trunk/libgdiplus/; revision=160453
  • Loading branch information...
1 parent 131afed commit 6004a8e923b470bd1f1e9c55a82fcb00ccce4e49 Sebastien Pouliot committed Jul 15, 2010
Showing with 6 additions and 2 deletions.
  1. +5 −0 src/ChangeLog
  2. +1 −2 src/lineargradientbrush.c
View
5 src/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-14 Sebastien Pouliot <sebastien@ximian.com>
+
+ * lineargradientbrush.c: Do not accept empty (width/height)
+ rectangles to create a linear brush. Fix bug #537396
+
2010-07-07 Sebastien Pouliot <sebastien@ximian.com>
* pngcodec.c: security fix in libpng 1.2 broke the define
View
3 src/lineargradientbrush.c
@@ -600,9 +600,8 @@ GpStatus
GdipCreateLineBrushFromRectWithAngle (GDIPCONST GpRectF *rect, ARGB color1, ARGB color2, float angle, BOOL isAngleScalable, GpWrapMode wrapMode, GpLineGradient **lineGradient)
{
GpLineGradient *linear;
- GpRectF *rectf;
- if (!rect || !lineGradient)
+ if (!rect || !lineGradient || rect->Width == 0.0 || rect->Height == 0.0)
return InvalidParameter;
linear = gdip_linear_gradient_new ();

0 comments on commit 6004a8e

Please sign in to comment.