Update of /cvsroot/ufraw/ufraw
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21352
Modified Files:
ufraw_developer.c
Log Message:
Make apply_matrix() safe against overwriting its data.
Index: ufraw_developer.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_developer.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- ufraw_developer.c 1 Sep 2009 05:24:50 -0000 1.71
+++ ufraw_developer.c 3 Sep 2009 17:30:07 -0000 1.72
@@ -640,14 +640,15 @@
const gint64 in[4],
gint64 out[3])
{
- gint64 tmp;
+ gint64 tmp[3];
unsigned c, cc;
for (cc=0; cc<3; cc++) {
- tmp = 0;
+ tmp[cc] = 0;
for (c=0; c<d->colors; c++)
- tmp += in[c] * d->colorMatrix[cc][c];
- out[cc] = MAX(tmp/0x10000, 0);
+ tmp[cc] += in[c] * d->colorMatrix[cc][c];
}
+ for (cc=0; cc<3; cc++)
+ out[cc] = MAX(tmp[cc]/0x10000, 0);
}
static void cond_apply_matrix(const developer_data *d,
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
ufraw-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ufraw-cvs