[Pixman] [PATCH 1/3] Bugfix for a corner case in 'pixman_transform_is_inverse'

Siarhei Siamashka siarhei.siamashka at gmail.com
Mon Jan 10 14:15:41 PST 2011

From: Siarhei Siamashka <siarhei.siamashka at nokia.com>

When 'pixman_transform_multiply' fails, the result of multiplication just
could not have been identity matrix (one of the values in the resulting
matrix can't be represented as 16.16 fixed point value). So it is safe
to return FALSE.
 pixman/pixman-matrix.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/pixman/pixman-matrix.c b/pixman/pixman-matrix.c
index abdfa05..f2f67ab 100644
--- a/pixman/pixman-matrix.c
+++ b/pixman/pixman-matrix.c
@@ -425,7 +425,8 @@ pixman_transform_is_inverse (const struct pixman_transform *a,
     struct pixman_transform t;
-    pixman_transform_multiply (&t, a, b);
+    if (!pixman_transform_multiply (&t, a, b))
+	return FALSE;
     return pixman_transform_is_identity (&t);

More information about the Pixman mailing list