[gimp/gimp-2-6] Bug 600112 - blur-gauss-selective.exe crashes



commit da9b8794a80e8694c6ea312362a029c99d4b578c
Author: Massimo Valentini <sixtysix inwind it>
Date:   Fri Mar 12 20:58:45 2010 +0100

    Bug 600112 - blur-gauss-selective.exe crashes
    
    Allocate buffers with some extra padding as the MMX instructions
    used in matrixmult_mmx() may read more than strictly necessary.
    (cherry picked from commit cbb815c20303c94fcfea221a55d528ba93ac7d90)

 plug-ins/common/blur-gauss-selective.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/common/blur-gauss-selective.c b/plug-ins/common/blur-gauss-selective.c
index 7765872..ac35d58 100644
--- a/plug-ins/common/blur-gauss-selective.c
+++ b/plug-ins/common/blur-gauss-selective.c
@@ -751,7 +751,9 @@ sel_gauss (GimpDrawable *drawable,
   mat = g_new (gdouble, numrad);
   init_matrix (radius, mat, numrad);
 
-  src  = g_new (guchar, width * height * bytes);
+  /*  allocate with extra padding because MMX instructions may read
+      more than strictly necessary  */
+  src  = g_new (guchar, width * height * bytes + 16);
   dest = g_new (guchar, width * height * bytes);
 
   gimp_pixel_rgn_init (&src_rgn,
@@ -810,7 +812,9 @@ preview_update (GimpPreview *preview)
                        FALSE, FALSE);
   render_buffer = g_new (guchar, width * height * bytes);
 
-  src = g_new (guchar, width * height * bytes);
+  /*  allocate with extra padding because MMX instructions may read
+      more than strictly necessary  */
+  src = g_new (guchar, width * height * bytes + 16);
 
   /* render image */
   gimp_pixel_rgn_get_rect (&srcPR, src, x1, y1, width, height);



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