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



commit cbb815c20303c94fcfea221a55d528ba93ac7d90
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.

 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 aa32cbb..47bd915 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, x, y, width, height);



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