[gimp/gimp-2-10] Issue #5009 - Possible array overrun in d_draw_ellipse



commit 56a361f55a34615c76bfbd7c9eb6031aeb0aad66
Author: Michael Natterer <mitch gimp org>
Date:   Sat May 2 16:52:18 2020 +0200

    Issue #5009 - Possible array overrun in d_draw_ellipse
    
    Change while() to go from 0..360 instead of 0..361 so the code passes
    automated tests. The code never ran into this situation but the change
    is a small improvement anyway.
    
    (cherry picked from commit 452924dbe962f2c7710ed4ac8415783d2034f910)

 plug-ins/gfig/gfig-ellipse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plug-ins/gfig/gfig-ellipse.c b/plug-ins/gfig/gfig-ellipse.c
index eac8091cb1..e6fd430173 100644
--- a/plug-ins/gfig/gfig-ellipse.c
+++ b/plug-ins/gfig/gfig-ellipse.c
@@ -148,7 +148,7 @@ d_paint_ellipse (GfigObject *obj)
       gdouble       angle = 0;
       gint          i = 0;
 
-      while (i < 362)
+      while (i < 361)
         {
           static const gdouble step = 2 * G_PI / 180;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]