[PATCH] gdiplus: Avoid division by zero in SOFTWARE_GdipDrawThinPath

Fabian Maurer dark.shadow4 at web.de
Mon Jul 24 17:50:09 CDT 2017


Fixes Bug 43290.

Signed-off-by: Fabian Maurer <dark.shadow4 at web.de>
---
 dlls/gdiplus/graphics.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index c5c66a9ed6..43cd6ac2dd 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -3615,6 +3615,9 @@ static GpStatus SOFTWARE_GdipDrawThinPath(GpGraphics *graphics, GpPen *pen, GpPa
                 end_pointi.X = floorf(end_point.X);
                 end_pointi.Y = floorf(end_point.Y);
 
+                if(start_pointi.X == end_pointi.X && start_pointi.Y == end_pointi.Y)
+                    continue;
+
                 /* draw line segment */
                 if (abs(start_pointi.Y - end_pointi.Y) > abs(start_pointi.X - end_pointi.X))
                 {
-- 
2.13.3




More information about the wine-patches mailing list