[cairo-commit] src/cairo-scaled-font.c
Chris Wilson
ickle at kemper.freedesktop.org
Sun Jan 13 03:41:05 PST 2008
src/cairo-scaled-font.c | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 8d6249b2c1200dfaf3e98c40e82ab2796e9ef28c
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sun Jan 13 11:40:53 2008 +0000
[cairo-scaled-font] Add missing matrix guard to cairo_scaled_font_create().
cairo_scaled_font_create() did not check the user supplied ctm was valid,
triggering an assertion later when computing the scale factors.
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 1ad10b9..03d8138 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -608,6 +608,9 @@ cairo_scaled_font_create (cairo_font_face_t *font_face,
if (! _cairo_matrix_is_invertible (font_matrix))
return (cairo_scaled_font_t *)&_cairo_scaled_font_nil;
+ if (! _cairo_matrix_is_invertible (ctm))
+ return (cairo_scaled_font_t *)&_cairo_scaled_font_nil;
+
font_map = _cairo_scaled_font_map_lock ();
if (font_map == NULL)
return (cairo_scaled_font_t *)&_cairo_scaled_font_nil;
More information about the cairo-commit
mailing list