From 40e0b91c0b35948865461750bad77f958daab9e5 Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Fri, 15 Mar 2013 14:46:19 +0100 Subject: [PATCH] cff-subset: Fix allocation of width arrays fd_default_width and fd_nominal_width are arrays of doubles not arrays of ints. --- src/cairo-cff-subset.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cairo-cff-subset.c b/src/cairo-cff-subset.c index bd8d5b5..c420bd4 100644 --- a/src/cairo-cff-subset.c +++ b/src/cairo-cff-subset.c @@ -1052,13 +1052,13 @@ cairo_cff_font_read_cid_fontdict (cairo_cff_font_t *font, unsigned char *ptr) goto fail; } - font->fd_default_width = calloc (sizeof (int), font->num_fontdicts); + font->fd_default_width = calloc (font->num_fontdicts, sizeof (double)); if (unlikely (font->fd_default_width == NULL)) { status = _cairo_error (CAIRO_STATUS_NO_MEMORY); goto fail; } - font->fd_nominal_width = calloc (sizeof (int), font->num_fontdicts); + font->fd_nominal_width = calloc (font->num_fontdicts, sizeof (double)); if (unlikely (font->fd_nominal_width == NULL)) { status = _cairo_error (CAIRO_STATUS_NO_MEMORY); goto fail; -- 1.8.1.4