summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2013-04-09 22:35:54 +0100
committerRichard Hughes <richard@hughsie.com>2013-04-09 22:35:57 +0100
commitfdaec65eb14a81bdd54907a1205899b53ec8d653 (patch)
tree217f8e4eeb405c46ca45b35754f56670a18034c6 /lib
parente62d431d512f6eedd3b2ecda5dfcf493e1239cb3 (diff)
downloadcolord-fdaec65eb14a81bdd54907a1205899b53ec8d653.tar.gz
libcolord: Return the correct result from cd_mat33_matrix_multiply()
If @mat_dest was allocated on the stack then it was never cleared and relied on the undefined behaviour of the default floating point values in the structure.
Diffstat (limited to 'lib')
-rw-r--r--lib/colord/cd-math.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/colord/cd-math.c b/lib/colord/cd-math.c
index 45bf156..6014d4b 100644
--- a/lib/colord/cd-math.c
+++ b/lib/colord/cd-math.c
@@ -355,6 +355,7 @@ cd_mat33_matrix_multiply (const CdMat3x3 *mat_src1, const CdMat3x3 *mat_src2, Cd
g_return_if_fail (mat_src1 != mat_dest);
g_return_if_fail (mat_src2 != mat_dest);
+ cd_mat33_clear (mat_dest);
for (i = 0; i < 3; i++) {
for (j = 0; j < 3; j++) {
for (k=0; k<3; k++) {