Fix buffer size check in TrueType subsetting

Andrew Cowie reported a problem with the Charis SIL font being
embedded as a fallback font.

The buffer size check for composite glyphs was incorrect causing the
subsetting to fail for some fonts.
This commit is contained in:
Adrian Johnson 2009-04-05 00:44:02 +10:30
parent ba2ec8e1d9
commit 9b496af5c2

View file

@ -495,7 +495,7 @@ cairo_truetype_font_remap_composite_glyph (cairo_truetype_font_t *font,
composite_glyph = &glyph_data->glyph;
do {
if ((unsigned char *)(&composite_glyph->args[1]) >= end)
if ((unsigned char *)(&composite_glyph->args[0]) >= end)
return CAIRO_INT_STATUS_UNSUPPORTED;
flags = be16_to_cpu (composite_glyph->flags);