From ae70b38d40a587e29dc5e0dfe6250693598beca7 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Mon, 10 Jan 2011 18:09:16 +0200 Subject: [PATCH] Bugfix for a corner case in 'pixman_transform_is_inverse' 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 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.7.4