summaryrefslogtreecommitdiff
path: root/src/cairo-truetype-subset.c
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2009-04-05 00:44:02 +1030
committerAdrian Johnson <ajohnson@redneon.com>2009-04-05 00:44:02 +1030
commit9b496af5c214283c297a52c90a04743f9da9f6a3 (patch)
treee6f1ca30c04c971e2e42eac6c12fb9164d3ac72b /src/cairo-truetype-subset.c
parentba2ec8e1d9144c4a27917e59cb15039552eb008c (diff)
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.
Diffstat (limited to 'src/cairo-truetype-subset.c')
-rw-r--r--src/cairo-truetype-subset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cairo-truetype-subset.c b/src/cairo-truetype-subset.c
index 8d1b5975..323a10c8 100644
--- a/src/cairo-truetype-subset.c
+++ b/src/cairo-truetype-subset.c
@@ -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);