Author: post
Date: 2010-11-14 11:22:26 +0100 (Sun, 14 Nov 2010)
New Revision: 3618

Modified:
   trunk/librawstudio/rs-curve.c
Log:
Fix buffer overflow when calculating max curve value.

Modified: trunk/librawstudio/rs-curve.c
===================================================================
--- trunk/librawstudio/rs-curve.c       2010-11-11 12:46:52 UTC (rev 3617)
+++ trunk/librawstudio/rs-curve.c       2010-11-14 10:22:26 UTC (rev 3618)
@@ -604,7 +604,8 @@
                                for (j = 0; j < 3; j++)
                                        if (curve->histogram_data[i] > max[j])
                                        {
-                                               for (x = 2; x >= j; x--)
+                                               /* Move subsequence entires one 
down the stack */
+                                               for (x = 1; x >= j; x--)
                                                        max[x+1] = max[x];
                                                max[j] = 
curve->histogram_data[i];
                                                j = 3;


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to