Commit a01a055c authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

fixed out-of-bounds array access.

2008-01-06  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/convmatrix.c (convolve_image): fixed 
out-of-bounds
	array access.


svn path=/trunk/; revision=24544
parent 2531fa76
2008-01-06 Sven Neumann <sven@gimp.org>
* plug-ins/common/convmatrix.c (convolve_image): fixed out-of-bounds
array access.
2008-01-06 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpmemsizeentry.c: use G_GUINT64_CONSTANT()
......
......@@ -571,8 +571,9 @@ convolve_image (GimpDrawable *drawable,
guchar *tmp_row;
gfloat sum;
gint x_offset;
gboolean chanmask[CHANNELS-1];
gint bpp,channel,alpha_channel;
gboolean chanmask[CHANNELS - 1];
gint bpp;
gint alpha_channel;
/* Get the input area. This is the bounding box of the selection in
* the image (or the entire image if there is no selection). Only
......@@ -605,7 +606,7 @@ convolve_image (GimpDrawable *drawable,
if (gimp_drawable_is_rgb (drawable->drawable_id))
{
for (i = 0; i < CHANNELS; i++)
for (i = 0; i < CHANNELS - 1; i++)
chanmask[i] = config.channels[i + 1];
}
else /* Grayscale */
......@@ -642,6 +643,8 @@ convolve_image (GimpDrawable *drawable,
for (row = src_y1; row < src_y2; row++)
{
gint channel;
x_offset = 0;
for (col = src_x1; col < src_x2; col++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment