Author: abrander
Date: 2010-12-21 21:51:52 +0100 (Tue, 21 Dec 2010)
New Revision: 3698
Modified:
trunk/librawstudio/rs-curve.c
Log:
Make sure loop doesn't overflow array in rs_curve_draw_spline().
Modified: trunk/librawstudio/rs-curve.c
===================================================================
--- trunk/librawstudio/rs-curve.c 2010-12-19 23:13:58 UTC (rev 3697)
+++ trunk/librawstudio/rs-curve.c 2010-12-21 20:51:52 UTC (rev 3698)
@@ -765,7 +765,7 @@
{
gdk_gc_set_rgb_fg_color(gc, &light_red);
gint x = 0;
- while (samples[x] < marker)
+ while ((samples[x] < marker) && (x < (width-1)))
x++;
current = height - current;
gdk_draw_line(window, gc, x, current, width, current);
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit