Vincent Povirk : gdiplus: Forbid creating path gradients with fewer than 2 points.

Alexandre Julliard julliard at winehq.org
Mon Apr 2 13:14:49 CDT 2012


Module: wine
Branch: master
Commit: ad9976eb223d4e0ffe8a3d72187cdfd37d586c73
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ad9976eb223d4e0ffe8a3d72187cdfd37d586c73

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Sat Mar 31 13:04:12 2012 -0500

gdiplus: Forbid creating path gradients with fewer than 2 points.

---

 dlls/gdiplus/brush.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c
index aa02598..4bf4928 100644
--- a/dlls/gdiplus/brush.c
+++ b/dlls/gdiplus/brush.c
@@ -517,6 +517,9 @@ static GpStatus create_path_gradient(GpPath *path, GpPathGradient **grad)
     if(!path || !grad)
         return InvalidParameter;
 
+    if (path->pathdata.Count < 2)
+        return OutOfMemory;
+
     GdipGetPathWorldBounds(path, &bounds, NULL, NULL);
 
     *grad = GdipAlloc(sizeof(GpPathGradient));




More information about the wine-cvs mailing list