Don't write past end of buffer. (#399484)

2007-11-19  Tor Lillqvist  <tml@novell.com>

	* libgimpwidgets/gimpcolorscale.c
	(gimp_color_scale_render_stipple): Don't write past end of
	buffer. (#399484)


svn path=/trunk/; revision=24193
This commit is contained in:
Tor Lillqvist 2007-11-18 22:31:08 +00:00 committed by Tor Lillqvist
parent 9ddec7eb78
commit 84fc8263a1
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2007-11-19 Tor Lillqvist <tml@novell.com>
* libgimpwidgets/gimpcolorscale.c
(gimp_color_scale_render_stipple): Don't write past end of
buffer. (#399484)
2007-11-18 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangleselecttool.c: Cosmitics. More strictly

View File

@ -754,7 +754,7 @@ gimp_color_scale_render_stipple (GimpColorScale *scale)
{
guchar *d = buf + 3 * (y % 2);
for (x = 0; x < scale->width; x += 2, d += 6)
for (x = 0; x < scale->width - (y % 2); x += 2, d += 6)
{
d[0] = insensitive[0];
d[1] = insensitive[1];